Billy's Blog

To post pictures and other goodies for free on the net.

My Photo
Name:
Location: Utah, United States

Born in Kapiolani Children's Medical Center, just a few blocks from Waikiki. Graduated from Kahuku High School. Rode BMX Freestyle for most of my life (more than 20 years), now my 8 year old son is ripping up the skate parks, but plans on getting drafted by the SeaHawks as a WR.

Monday, September 28, 2015

Wordpress linking to old site

I have gotten myself into WAY too much trouble after migrating other people's Wordpress site from one server to another. This is not Wordpress specific, other CMSs use static URL's in their database rather than keeping it in a CONFIG file somewhere that you change when you change the database login info so that these problems do NOT happen, but they don't so this is what you need to change if you notice that when you log into the admin side of things and it is the old site. (Or you break the old, live site, even if you don't have access to their live DB or passwords)

I got this from a WP tutorial site.

Step 5: Changing the Site URL

Now you need to change the site URL, so you can setup your live WordPress site. In your phpMyAdmin, look for the wp_options table in your database that we just imported in step 4. If you changed your database prefix, then instead of wp_options it might be {prefix}_options.
Click on the browse button next to wp_options or the link that you see in the sidebar to open the page with a list of fields within the wp_options table. See screenshot below:
Browse wp_options in phpMyAdmin
Under the field options_name, you need to look for siteurl. Click the Edit Field icon which can be found at the far left at the beginning of the row.
Edit siteurl in phpMyAdmin
When you click the edit field, an edit field window will appear. In the input box for option_value, you will see the URL of your local install probably something like:http://localhost/test. Carefully insert your new site url in this field, for example:http://www.wpbeginner.com
Save the field by clicking the Go button.
Next, you need to replicate this step for the option name: home. The wp_options page can be a few pages long, so simply find the home tab. Usually it is on the second page which you can navigate to by clicking on the pagination arrows in phpMyAdmin.
Update the home url to be the same as your siteurl.

Friday, September 04, 2015

Wraping a full line Notepad++

Lets say you have a list of items that you want to convert to an HTML <UL><LI> tag set.

In Notepad++ you can take the list and use the Search/Replace function with the "Regular Expression Mode" selected:













In the "Find What" box use the following, including the parenthesis:
(.+)

This will select each line.
Next you will use the "\1" code to let NPP know what you are going to "wrap". You "wrap" this with whatever you would like to wrap it with, say double quotes like this:
"\1"

or in our case, a <LI> tag set:
<li>\1</li>

This will allow you to wrap every line in a <LI> tag set.