Want To Move Wordpress To A New Domain? Here Are 13 Steps To Make It Happen!
I've moved a lot of domains throughout my career as an online marketer. There are many reasons why one would want to move WordPress to a new domain such as rebranding, domain portfolio consolidation, merger or acquisition, etc. Because it's not uncommon to move domains, I thought it would be good to put together a step-by-step cheat sheet for the average guy/gal who wants to quickly and easily move their WordPress site to a new domain while salvaging as much link equity as possible. The process isn't as hard as you might think, so let's roll up our sleeves and get our hands dirty.
1. Pick your new domain name.
I talk to a lot of people about purchasing new domain names. Some of the more common questions I receive are "should I buy a domain name with keywords in it?" or "should I buy a .com or will .info work?". In the earlier days of my career, I would have said that keyword rich or even better, exact match keyword domain is the only way to go. I guess you could say that I have grown up over the last few years and always recommend purchasing a domain name that can become a strong brand. That being said, it's your business, so pick a domain name that works for you.
As for a company to register your domain with, I use NameCheap (not an affiliate link) and have never had a problem with them.
2. Install WordPress on your new domain.
Before moving your website over to a new domain, you need to install WordPress on the new domain. I am a huge fan of just about any hosting company who offers one click install WordPress installation. I host with HostMonster (not an affiliate link) and swear by them, however Ash has a different opinion.
If you don't host with a company who offers one click installation options, you can learn how to install WordPress on your new domain here.
3. Put up a robots.txt on the new domain that disallows the search engines from indexing the content.
The last thing we want to do when moving a domain is have a whole site of duplicate content get indexed and possibly penalized before we even have the chance to push our link equity from the old domain to the new one. To make sure this doesn't happen, add the following contents to your robots.txt file.
4. Make sure your current WordPress install is the same version as the install on your new domain.
If you are like me, and I pray you are not, you never update your WordPress install. You either don't do this because you are lazy, or you are afraid that an update will break your current theme (if this is the case, you need a new, SEO friendly design).
If you want to make the migration process as seamless as possible, you will need to update your install to the same version as your new domain.
5. Copy files over to the new domain.
Other WordPress migration guides will tell you that you have to copy all files over to the new domain. If you follow my step by step guide, you only have to move one folder from your old domain to your new domain in order for everything to work properly. To get started, you need to open your favorite FTP client. I like to use FireFTP.
Login and browse to the folder where your website files are located. The only files we need to move are those located in the wp-content folder.
You will want to download the entire folder and then upload it to the new domain. It will overwrite the wp-content folder on the new domain, but that's okay. Now your theme(s) and your plugins are all on your new domain.
6. Export the database and upload to the new database.
To export and upload databases, you will need to work in the phpMyAdmin of your web host.
Once logged in, you should locate your database. It can get a little tricky if you have multiple databases and don't know the name of the database for your old WordPress install. Once you find the database, you should head to the export section, make sure you are exporting in SQL format, and I like to compress my files. Export and you are half way there!
After you export the database, you will need to find the new database name and head over to the import tab. As with most imports, they are pretty easy, just browse to the file, make sure the format is still SQL and import it.
7. Verify that the wp-config.php has the right database settings and two lines of additional code.
If you have followed all of the steps thus far, your database settings should be accurate, however, you will want to double check the name and the password of the database just in case. After verifying the database information, you will want to add the following lines code to the file, replacing sample.com with the right domain name:
8. Verify that that your new install has the same settings as found on the old domain.
Again, if you have followed all of the steps in the process above, your settings should remain the same. You will, however, want to double check everything.
9. Install the search and replace plugin and do a search and replace for your old URL's and change them to your new URL's.
Now that all of your content and your theme has been moved over, you will want to replace any mention of your old brand name or URL. The easiest way to do this is by installing the search and replace plugin. This is a pretty tricky plugin and you can mess things up in a hurry, so please read the instructions and keep a backup of your database in case you overwrite something on accident.
10. Check and re-check everything! Make sure that everything works properly.
Please check everything twice or even three times. The last thing you want to do is launch a site that doesn't work properly. Check your links (since you used the search and replace plugin), check your forms, check your URL, check everything!
11. Remove the robots.txt exclusion.
Not much else to say here...
12. Add the following code to your .htaccess file on your old domain.
Redirect 301 / http://www.newdomain.com/
13. Update your FeedBurner account with new feed URL
If you are running your blog feed through FeedBurner, then you need to update your account with the new feed url. If you are not running your blog feed through FeedBurner then you should be ashamed.
At this point, your new site should be up and running. It may take a few days to get the new domain crawled and indexed with the search engines. I've found that by tweeting a link to your new site or sharing it on Google+ will help speed up the amount of time it takes to get the crawlers to your new site. You might also consider dropping a few blog comments on popular blogs as well.
If you have any other tips to add to my list, please do so in the comments below.