Even tho this thing is rather simple i usualy find only bad posts or they make me use extra plugins.
While as usual – moving WP between domaisn or servers is easy. Here is steps:
1. Copy all files to new location [domain]
2. If domain is on new server – make php my admin dump of your mysql file
3. Upload all files to new domain
4. If domain is on new server create db and user, load the base and edit config.php. If new domain of wordpress is on same server – this is not needed. Yes moving wordpress between domains on same server is super easy.
5. Now load phpmyadmin and run following 3 commands in SQL:
UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-domain.com’, ‘http://www.new-domain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET guid = replace(guid, ‘http://www.old-domain.com’,’http://www.new-domain.com’);
UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.old-domain.com’, ‘http://www.new-domain.com’);
Now your wordpress has 100% updated links and permalinks and everything will work on new domain.
Originally posted 2013-07-03 02:53:45.