Transfer WordPress Blog to a new Domain or Provider
Version: 13.2
Revision: 45 Build 11
Transfer WordPress Blog to a new Domain or Provider.
Introductions: For those who would like to migrate their ‘SQL_DB’ from their old server, then please take a look at this tutorial and prepare your migration with phpMyAdmin. But, don’t worry, as I’ve written everything and there should only be ‘copy & replace’.
Warning: please backup your SQL database before try / attempt this tutorial!
1.] First, you must login to your Cpanel and navigate yourself to phpMyAdmin. After that, you’ll need to select your “WordPress” database.
2.] Select the “Query” box or look for the specific strings within “wp-options”. However, you must use these codes in proper orders.
The following orders are shown below…
1a.] Select “wp-options” and click on “Browse”. After that, please look for these SQL strings and click Edit.
However, please look at the “option_value” and “option_name” before you edit the strings.
option_name: siteurl
option_name: home
When you see these strings, carefully change your WordPress domain name or sub – directory.
b.] If you can’t find these strings, I would recommend you to use this “Query”. Nevertheless, this command can only be use in “phpMyAdmin” Query Box.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
2.] When you’re done with ‘Step 1′, please erase your previous strings, then add this codes into your Query Box.
Notes: This query will update your old posts and pages, which is translated from post slug, and stored in database “wp_posts” table as “guid” field.
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com');
3.] When you’re done with ‘Step 2′, please erase your previous strings, then add this codes into your Query Box.
Notes: This query will fix all internal links to your own blog, posts and pages.
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
4.] Finally, you’ll need to browse through WordPress blog to check if everything is functional.
You also need to re-login to WP Administration as authentication cookie has now became invalid due to different domain.
5.] This tutorial has ended, please keep this articles for future reference…
Copyrighted by Lair360


