We recently moved our blog to a new address and the migration went smooth and easy. If you’re looking for a guide to move your WordPress blog to a new domain without annoying your users and search engines, follow the following guide.
- Firstly, make sure that your new domain was setup atleast 12-24 hours before, so that it resolves correctly to the required name servers.
- Now, copy all files and the database from old to the new domain. You can download a zipped copy of your files from your Hosting Control Panel and the database can be exported via phpMyAdmin.
- Now, edit
wp-config.php
with correct database settings and add the following lines replacing example.com with your new domain.define('WP_SITEURL', 'http://www.example.com'); define('WP_HOME', 'http://www.example.com');
- Now, setup your blog the same way as it was on the old domain. Also delete your cache if you were using a caching plugin otherwise it might show the old cached version of the page.
- See if your blog works fine. You may need to use the Search and Replace plugin to change the internal links inside the posts such as of images.
- Visit all specific pages e.g Homepage, Archives Page, Search Page; etc to check that everything is working as it should.
- Now, to redirect all visitors from old domain to the new one, add the following code to your old Domain’s Apache .htaccess file. Don’t forget to replace oldsite and newsitewith your old and new domains respectively.
RewriteEngine On RewriteCond %{HTTP_HOST} ^.*oldsite.com$ [NC] RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]
- You can submit a Change of Address request through your Google Webmaster Tools account which will help in updating the Google index faster.
Leave back a message below of how successful your migration went or if you have some doubts.
Add Comment