Moving A WordPress Site To A New Domain: A Complete Step-By-Step Guide

Moving A WordPress Site To A New Domain: A Complete Step-By-Step Guide

I recently moved one of my other website to a new domain name. The whole process was little bumpy, but I got great experience and knowledge in carrying this out.

In addition, I am so happy that I took this decision for the good of my online business.

PS: Since this post is too long, I have created a pdf of the post so that you can download, keep it and use it when you need it :)

So, when my memory is still fresh, I would like to compile the steps involved in the whole process of moving a WordPress blog/site from one domain to another domain. Even though there is nothing you should be scared of while considering about moving a site, you have to be extra careful and do things the “correct” way so that you don’t lose your SEO aspects from your old domain.

But before that …..

Why would you want to move to a new domain?

Moving a WordPress site or a blog to a new domain can be a real pain. But everything comes down to the question “Why would one want to move their site to a new domain?”.

Let’s say you have a wonderful blog up and running at a domain “domain1″. The blog has a good PR, a good community of readers/commenters, the blog converts well in terms of ads and affiliate sales, the blog has a good branding (known for its name), it has lots of good incoming authority links, let’s presume.

Now for some solid reason you want to move domain1 to domain2. The same blog to a different domain. This is my story, exactly.

As you know by now, I was running Find All Answers as a multi-niche blog for over an year now. It had got PR 3 (at the time of writing this post) and several other good metrics. Yet I had some problems with the domain and the site as a whole.

1. The domain name “Find All Answers” is too generic.

2. It does not have any keywords.

3. The site was multi-niche and hence not targeted. I know I was able to run a trio-niche site for quite a long time, pretty successfully and capture the attention of wide range of audience. But when it comes to conversion and ranking, since I was handling too wide and un-related topics, I couldn’t cope.

4. Due to (3) I was ranking for keywords which I didn’t want to rank at all; at the same time I found it really difficult to rank for those keywords which I wanted to!

So I decided to make a change –  a big one indeed.

I decided to move to a new domain –

Now let me spill the beans and give you the exact step by step procedure of moving a WordPress blog.

How to move without losing link juice and SEO?

Although moving a WordPress site to a new domain can be a scary thing, it is not that messy. If you follow a set of steps (quite logical by the way) it is all neat in the end.

I must admit that one of the scariest and most tiresome things was to do the file transfers. Hostgator helped me with file transfer and I went hands free on that!

OK let me put you through the step by step process of doing this correctly.

If you follow these steps exactly, you will regain your link juice and SEO aspects – should not be an issue.

Step 1:

Do a complete backup of your old site, just in case anything goes wrong anywhere, you should be able to restore things. I recommend BackupBuddy plugin which does a complete backup of your entire site. It backs up all files and databases unlike other plugins which backup the database only.

Step 2:

In your old domain (domain1) go to Tools on the left sidebar and click on “Export”. On the screen select “All content”. This means that all your posts, pages, comments, custom fields, nav menus and other custom posts will be exported.

export posts and pages from old domain


Click on “Download Export File”. It will be a .xml file. Save it in your computer.

Step 3:

Grab the wp-content folder from your old domain. This is where your themes, plugins and uploads reside. You can do it in two ways-

1. If you have access to cpanel, login and go to the root of your old domain through File Manager. Click on wp-content folder and compress it.

compress wp-content folder


Once the compress process is over, reload or refresh the file manager. Now you can download this compressed file and save it in your computer.

2. You can also use a FTP application like FileZilla to transfer your wp-content folder direct to your computer. For this option you should have an ftp account.

Step 4:

This is an optional step. If you have any subdomains in this domain, make sure you copy those files as well. If not, you can skip this step.

Step 5:

Install WordPress on your new domain. If your domain is hosted on Hostgator here is a step-by-step tutorial to install WordPress on Hostgator.

Step 6:

Login to your WordPress dashboard using the link Make sure you change “yournewdomain” to your actual name of your new domain.

Note: If you have not set up your DNS (Domain Name Servers) you won’t be able to either visit your site or login to dash. So make sure you have this already correctly set up before starting your move. It will take from 24 to 48 hours for the changes to propagate completely. If you need help with setting up DNS you can contact your hosting provider or domain registrar.

Step 7:

After logging in to your new domain’s WP dash, go to Settings – General and set up WordPress address and Site url to be the same – either with or without www.

Next go to Settings – Permalinks and set your permalink structure to be EXACTLY the same as that of your old blog. This step is highly crucial because later on you will automatically redirect your old domain to new domain. In this redirection, all your pages of the old domain will be redirected to that corresponding page of the new domain if and only if you have the same permalink structure in both the places. Otherwise you will mess things up!

Step 8:

Now, you need to upload your wp-content that you saved from your old blog. Just as you did with downloading you can use any one of those corresponding methods with uploading as well.

Make sure you upload the wp-content in the root directory of your domain. If you’re not sure about the directory, see if there is already a wp-content folder (this would have been created as a result of your WordPress installation). You will simply overwrite that folder.

This step could take longer if you have large number of posts, images and stuff.

Step 9:

Go to Tools – Import in your WordPress dash and then select “WordPress” from the list. You’ll be asked to install a plugin “The WordPress Importer”. Click “Install now” and then click “activate & run importer”.

You’ll get the following screen:

import using wordpress importer

Here you have to click on “choose file” and then select the .xml file that you imported from your old domain and then press “upload file and import”. Once this is done, you will have all your posts, pages and comments from your old domain.

Note: If there is a long gap between your export from your old domain and importing to your new domain, you might lose some comments (and posts too, if they happened to be scheduled at that transition time). So it is better that you do this when most people are not reading your blog and check whether you have any posts scheduled in the queue for that day.

Step 10:

Activate your Theme – the same theme which was activated in your old domain, if you don’t want to change your design as well!

Go to “Installed plugins” under Plugins and activate those which you have activated in your old domain. Also make sure the plugin settings are also the same as that of your old site (this won’t be a problem usually, but double check anyway).

Step 11:

Now it is time to change your urls – the urls you use in your site. This could be the urls that reference to your old domain as links within your post, category links in a custom category bar, links in navigation bar and so on.

You don’t have to be updating one by one manually. There is a cute plugin – Update URLs WordPress Plugin which takes care of it.

Be informed that this plugin will not take care of redirecting your old domain to new domain. It will simply replace the occurrence of old domain url with the new domain url throughout your blog’s content and layout (like header, sidebar, nav bar, etc., wherever you have custom links).

Regarding links within the style files, different themes have different options. I had no problems with Thesis theme custom files. The plugin modified the links within my custom.css and custom_functions.php files.

Step 12:

Check, double check and triple check. At this point make sure that your old domain looks exactly the same as the new domain. Both the sites should be copies of each other.

If not, you have to check on your themes, plugins and sidebar widgets. Also, in the new domain, put your mouse over navbar and sidebar links and see if they point to your new domain’s links.

Step 13:

The most important step – and not a good number lol.

You have to perform this step only after you have verified that your blog/website at the new domain looks exactly the same as that of the old one and the links have been transformed. After this step (Step 13) you won’t be able to see your old blog again, ever!

OK here we go:

Find the .htaccess file of your old domain from your cpanel or ftp client and edit it. Add the following lines to the top of the file.

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$$1 [R=301,L]

Don’t forget to save the file. These lines of code does the 301 redirect (highly recommended by Google and other search engines for moving a site).

You need to use 301 redirects if you don’t want to lose your SEO and link juice. 301 is a permanent redirect which tells the search engine bots that the site has been moved permanently (that it would never come back to the old location again) and 301 redirect will pass on link juice.

Although there is a little page rank evaporation associated when a link is redirected, 301 carries most of the SEO benefits of the old domain to the new domain. Over the time, your rankings should come back.

Now if you click your old domain url or type the url of any page from your old domain you will get the corresponding page from your new domain.

Step 14:

Yes there is one more step. You need to tell Google that you’ve moved your site. This step assumes (and it is highly recommended) that you have a webmaster account and you have verified your old domain.

Go to Google Webmaster Tools. Here’s how you need to add and verify a site – Adding a site to Google Webmaster Tools.

Follow the same procedure and add your new domain and verify it as well.

In your Webmaster dashboard, click on the old domain; on the left expand Site Configuration and click on “Change of address”.

You will have 4 items. Items 1-3 will be covered if you’ve followed the above steps exactly. Item 4 is where you give your new domain.

enter new domain url in webmaster toolsOnce you submit you’ve informed Google that you’ve moved. Now they have to crawl your new site and index your new domain urls while de-indexing the corresponding old domain urls.

We are not done yet. Install Google xml sitemaps plugin in and create a sitemap. Now in your webmaster dash, click on the new domain and under Site Configuration, click on sitemaps. Here you have to upload your new domain’s sitemap.

That’s all.

Everything is a set now and you are ready to rock with your new domain. As to SEO, link juice, PR and other metrics, don’t worry you’ll get them all in a short span of time.

It took me more than 10 hours to write this post. I’d highly appreciate if you could press any of the social sharing buttons and spread the word.

PS: Since this post is too long, I have created a pdf of the post so that you can download, keep it and use it when you need it :)

One Response

  1. Sam wilson

Write a Comment