As my host cannot resolve the wildcard DNS problem, I decide to migrate my blog from http://wedding.ivan-grace.com/myblog/ to http://www.ivan-grace.com/wedding/myblog. The current problem is most probably caused by the use of sub domain.
Initially, I wanted to copy the blog to http://www.ivan-grace.com/ourblog, This migration involves both Change The Site URL and Change Domain Name, and it really hurts. I spent three hours trying to update the URI but it seems it is a endless process. I still do not understand why wordpress has to hard code all the URIs.
Though following the instruction given by Wordpress, I cannot get rid of the error generated by widget.php, and I found that I had to update wp_postmeta for the links to the files. As a result, I gave up and decide to just change the site url and it works fine following the instructions below:
Copy files
If the file directory is moved, make sure to copy all themes and plugins documents to the new directory
Change Post URL
- Login to phpMyAdmin.
- Click the link to your Databases.
- A list of your databases will appear. Choose the one that is your WordPress database.
- Look for the name of the table within your database used to hold your post information. Usually it is called wp_posts, but it may have been changed. Write it down.
- Clicking the Browse icon or link, open the wp_posts table.
- Look for the field that holds your post “guid”. It is usually called guid, but it may have been changed. Write it down.
- Click the tab at the top for SQL.
- Using the information you wrote down from above and the old and new URL addresses you wish to update or search and replace within your database, type in the following (CAREFULY):
UPDATE wp_posts SET guid = REPLACE (
guid,
‘http://wedding.ivan-grace.com/myblog’,
‘http://www.ivan-grace.com/wedding/myblog’);
Change site_url and home
- Backup your database and save the copy off-site.
- Login to phpMyAdmin.
- Click the link to your Databases.
- A list of your databases will appear. Choose the one that is your WordPress database.
- All the tables in your database will appear on the screen.
- From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
- Click on the small icon indicated as Browse.
- A screen will open with a list of the fields within the wp_options table.
- Under the field option_name, scroll down and look for siteurl.
- Click the Edit Field icon which usually is found at the far left at the beginning of the row.
- The Edit Field window will appear.
- In the input box for option_value, carefully change the URL information to the new address.
- Verify this is correct and click Go to save the information.
- You should be returned to your wp-options table.
- Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the > symbol to page through them.
- In the input box for option_value, carefully change the URL information to the new address.
- Verify this is correct and click Go to save the information.
- Delete the folder wp-content/cache (this is a new folder added with WordPress 2.0).
- That is it.
Misc Changes
- Blogroll
- Internal URL
- Other URL refer to the previous address.

[...] Read the rest of this great post here [...]
Add A Comment