We encourage our managed shared hosting customers to develop new WordPress sites on a subdomain off of their main domain — for example, dev.your_domain_name.com — and test it out, prior to making their site live. So now, you have a fully developed site at dev.your_domain_name.com, and you want to move it to www.your_domain_name.com; now what?
This takes three simple steps using ftp, phpMyAdmin, and editing your wp-config.php file.
Use FTP to archive (backup) your main site, and then delete all contents except for awstats, cgi-bin, cgi-local, cp, and webalizer; when in doubt as to what to delete, contact our customer support department.
Then upload your WordPress site from your dev.your_domain_name.com to your_domain_name.com.
In phpMyAdmin run the following two SQL queries replacing dev.your_domain_name.com with the full subdomain name you were using and modifying www.your_domain_name.com with your domain name including the “www.” subdomain prefix:
UPDATE wp_options SET option_value = replace(option_value, 'http://dev.your_domain_name.com', 'http://www.your_domain_name.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://dev.your_domain_name.com', 'http://www.your_domain_name.com');
NOTE: There are two best options for running the above mySQL SQL statements: (1) via phpMyAdmin or (2) reviewing the wp-config.php file for the mysql login credentials and then using “mysql -H [mysql host without brackets] -u [mysql user name without brackets] -p[mysql password — no space after the minus p — without brackets] [mysql database name without brakets]” via SSH.
Then edit your wp-config.php file and place the following two lines (again replacing dev.your_domain_name.com with the full subdomain name you were using and modifying www.your_domain_name.com with your domain name including the “www.” subdomain prefix) right after the initial comment —
/* @package WordPress */ :
That’s it; now browse your new site, and double check the WordPress back end of your new site.
Since we take our managed hosting seriously, if you don’t have time for the above steps or you find the above steps a little daunting, contact our customer support department letting us know the dev.your_domain_name.com and www.your_domain_name.com asking us to do the move for you for free.