Many blog owners are scared and hesitated to move their blog to another domain because they fear to lose their visitors, downtime and other complications. I will show you now how to get rid off this fear and how to avoid problems while you moving.
First of all, make a backup of all your data in your database and your customized themes and other files.
- On your new domain, create an
index.php, with the function header() , to let the search engine know, that something is coming soon, visit us again.
<? header("HTTP/1.0 503 Service Unavailable"); header("Retry-After: 3600"); ?>
- After that, you import your data into the new database and upload all files.
- Adjust the
wp-config.phpaccordingly. Open the file in your editor and add following data:
define('WP_SITEURL', 'http://www.example.com'); define('WP_HOME', 'http://www.example.com/blog');
I suggest to this in every other blog too. You save a request to the database and it improves the performance of your installation. Please check the correct definition, even a wrong / can deny access to your blog for visitors.
After you add these definitions, don't forget to check off both fields in your settings area. See screenshot:
Note: if there is a Plugin or modification to cache active, please deactivate it.
index.phpwhich you created in the beginning. Searchengines are having access now.
.htaccessfile and put in:
Redirect 301 /blog/ http://www.example.com/
Acquire just your domains at another cheap but reliable provider, where you can change the DNS settings easily whenever you change to a new host. So you won't have any troubles, if your old provider don't let your domains transfer to your new host. You just have to change the DNS settings and don't have to hassle with your host provider.
That's about it, good luck with your move! And if you have further tips, let us know!