How To Move Your WordPress Site To A New Domain in 10 Steps, Without Sacrificing SEO

moving-migrating-wordpress-to-new-domainYou’ve found it. The only migration guide you’ll ever need. Here are a few of the people who’ve used this guide to successfully moved their wordpress site to a new domain.

Ali Macaluso says:
Thank you, thank you, THANK YOU!!! You just saved me some serious time and aggravation! Plus, you mentioned my girl Brankica so I knew I could trust you This is great!!!

Salman says:
Step by step and really informative tutorial …. I migrated it for the first time and succeeded without a single mistake. Thanks a ton !!

Claire Seet says:
Thanks for this. The plugin recommendation has saved me from going blind trying to copy and paste into phpmyadmin directly.

So i’m going to show you how to do it, without:

 – sacrificing seo
– losing all your link juice
– or dramatically decreasing the amount of traffic you get.

A few things you might want to know before we get started:

1. I am using the Backup Buddy wordpress plugin for this process. You’ll need that plugin to follow this guide. (Use discount code  ITPAL25 to get 25% Off your purchase)

2. Switching to a new domain name will affect your search engine rankings as Google adjusts to the changes.

3. You will lose domain authority because you’re moving to a new domain.

The great part is that you can dramatically decrease the negative effect the migration will create by Doing It Right – and this is what this guide is for.

3 Reasons Why You Might Be Looking To Migrate

1. Rebranding Purposes – Maybe your blog’s brand has gotten a bad rep throughout the years and you’re just looking to start off with a clean slate. Moving to a new domain that no one is familiar with might be the first step.

2. Widen (or Narrow) the Scope of the site – Some bloggers start off with a domain like YogaFitnessForKids.com and may find that their market actually consists of busy moms looking to get into Yoga.

The blogger then decides to widen the scope of the site to attract more busy moms and calls it YogaFitnessForAll.com – or vice-versa.

3. From Personal to Brandable – This was my reason, with a bit of number 2. You may be running a site that brands you (like I was) and want to switch over to a domain that fits better with the things you’re talking about on the blog.

I wasn’t just writing about blogging here. I discussed building an audience of people using search engine traffic as well as social media; while optimizing your site to convert more visitors into subscribers.

When I looked at the entire site from a 10,000 foot view, it all fell nicely into one simple concept that I’ve come to accept and believe in. Which is…

Inbound Marketing… the process of using non-intrusive media strategies (blogging, seo and social media) to get your audience to come to you; as oppose to blasting out email ads, paying for flashing banners, and using interruption marketing to get attention.

If you’re considering moving to a new domain, what’s your reason for doing so? Let us know in the comments below :0)

The 10-Step WordPress Migration Guide

IMPORTANT: Before we get started, please note that this guide is not for moving your wordpress site to a new server or web host. Some of the steps are the same but there’s more to that process.

This is for you if you want to go from YourDomain.com to YourNewDomain.com on the same server and hosting company. Great – let’s get to it…

Step #0. Domain & Hosting:

I’m creating this with the assumption that you already have your new domain registered and that you have applied hosting to it. If you haven’t done this step, this is the time to do it.

  • Get a brand new domain name
  • Get it hosted and then move on to step #1.
Step #1. Perform a Full Back-Up

I used the Backup Buddy wordpress plugin to do this step. The plugin isn’t free, but it is awesome and easy to use.

All you have to do (after you install it and activate it) is click on Backup and Restore under the Backup Buddy settings.

Once you reach this screen (screenshot below) simply click on ‘Full Backup‘  and the plugin will begin creating a file with all of your content, posts, pages, plugins, comments, files, images, media, etc.

backup-buddy-migration

and step 1 is done!

Step #2. Download the Backup to your Computer

Depending on how much content you have on your site, the backup can be done quick (a few minutes) or it might take a bit longer.

Once the backup is finished, you’ll see the link to your backup in your Backup Archives. You’ll find that on the same page you’re on now. (screenshot below)

Click on this link to download the backup file to your computer and save it on your desktop for easy access. You’ll need this backup file for step #5.

backup-buddy-download

Bam.. Step 2 down!

Step #3. Download the Import Buddy Script

Your backup file is most likely downloading right now, so let’s do step 3 and 4 while we wait.

The backup buddy script is what makes Backup Buddy an awesome plugin. We’ll be using this script later to restore our wordpress blog on the new domain.

All you have to do now is download it to your computer (on the desktop again for easy access) and move on to step 4. The download link is on the same page as step 1 and step 2 – it’s titled “ImportBuddy”

Step #4. Create a New My SQL Database

Depending on which hosting company you’re with, this process will be a bit different, but the end result should be the same.

Whether you’re using Hostgator, Bluehost, Dreamhost or any other web-host, you should end up with this information:

  1. Hostname:
  2. Database Name:
  3. Database Username:
  4. Database Password:

This info will be needed when we’re running the import script on your new domain and importing your blog. If you get stuck creating a database and attaching a username and password to it, contact your hosting provider and they should be able to help you out.

Step #5. Upload the Backup File & Import Script

At this point you should have the backup file and the import script downloaded on to your computer’s desktop. Now it’s time to get it on your new domain.

Open up Filezilla (or your favorite FTP software), log in and go to the root of your new domain. Drag your backup file and the import script to the root of your new domain and let it upload.

ftp-import-buddy…and that’s it for step 5!

Step #6. Run the Import Buddy Script & Follow The Instructions

At this point both the Import Buddy script and the Backup File should be uploaded on to your new domain. The rest is super easy. Just run the import buddy script and follow the steps.

Make sure you have the Hostname, new Database Name, Username & Password in hand because you’ll need this information. (but you knew that already)

To run the importbuddy script just go to: www.YourNewDomain.com/importbuddy.php

Step 1 of 6: Select the backup file you want to import (it will most likely detect the file automatically)

Step 2 of 6: Select MIGRATING

Step 3 of 6: Backup buddy will extract all the files – Press next step when it’s finished

Step 4 of 6: Enter the Hostname, New Database name that you created, as well as the Username and password.

Step 5 of 6: Once you reached step 5, the migration is done and you can click on “Delete Backup File”

Step 6 of 6: Congratulations, it’s done.

But we’re not done yet… let’s go to step 7.

Step #7. Install the Search and Replace plugin.

Your new domain might still have content that direct visitors to your old domain. This plugin makes it easy to search for that text and replace it with your new URL.

So once you activate the plugin on your new wordpress site, run a search for YourOldDomain.com and replace it with YourNewDomain.com – this is a pretty simple process, it should take you about 3 minutes to do.

Step #8. Check Everything – not once, not twice but 5 Times.

Check the links. Check the posts. Check the navigation bar. Check the images. Check the opt-in forms to see if they still work. Check everything to make sure your site is an exact replica of the old one.

…and make sure that the Search and Replace actually worked by seeing where the links take you. Here’s another issue that you might encounter. I noticed that all of my apostrophes turned into diamond symbols when I migrated.

This literally took me hours to figure out and thanks to a blogging buddie, Brankica, who led me in the right direction, I found two lines of code that fixed the problem.

Here they are: and all I had to do was add these lines to my wp-config.php file and presto – it was as good as new.

  • define(‘DB_CHARSET’, ‘utf8′);
Step #9. This is the BIG Step – Permanent 301 Redirect

Once you’ve checked everything, you need to perform a permanent redirect from your old domain to the new one.

This is extremely important because it will let the Big Gorilla (Google) know about the changes you’ve made – AND every visitor that lands on one of your old posts will be redirected to your new site.

Awesome! Here’s how you do it.

Open up Filezilla and go to the SERVER tab. Under the SERVER tab you’ll see the option to ENABLE > “Force Showing Hidden Files” – This will allow you to see and access the .htaccess file that you need to edit to perform the redirect.

Open up the .htaccess file on your OLD Domain and copy and paste this code (with your domain in it of course) on the very TOP of the file:

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.ENTER-YOUR-NEW-DOMAIN-HERE.COM/$1 [R=301,L]

Then simply save it and visit your old Domain to witness the redirect for yourself.

Step #10. Let Google Know About The Change

webmastersI highly recommend going to your Google webmasters account and submitting a change of address. To do this, click on your verified site and on the left hand menu, click on Site Configuration. (Screenshot to the right)

Under Site Configuration, you’re going to click on Change of Address. Just enter your new domain, verify it and you’re done!

Any Questions?

Leave them in the comment section and if you found this guide useful, please share it

…and remember to use discount code  ITPAL25 to get 25% Off your Backup Buddy purchase)

Comments

  1. says

    Hey Hector, thanks for this brotha. I been trying to figure out how to do this.

    I couldn’t find a way so I just started from scratch. I still have the old one active.

    Quick question.

    I already started my new blog. Can I still do the change and have all the old content put on the new blog without messing with the New content?

    Thanks again bro.
    Joey

    • says

      That’s a good question. The migration probably wouldn’t work the way i described in the post but wordpress does have an export and import feature that you can use to get your old content on your new blog.

      If it works the way i think it does, your new content shouldn’t be affected.. I would test with another domain before trying this out though – just to be safe

      hope that helps

    • says

      Hey Mandi yes, it is spammy and you can get penalized. When I created my testing site, I turned off all indexing, seo, and any of those things that google can pick up.

      this keeps it from going into the search engines and keep the site strickly for testing.

  2. says

    Hector,

    Great advice!

    I made the switch myself just recently, but I lost my Alexa rankings in the process … did this happen to you?

    Cheers,
    Timo

    • says

      Yea.. Same thing happened to me. It’s one of those things you can’t control. I started at 15 million and already down to 331,000 in about two weeks. It’ll get back to where it was in a month or two.

  3. says

    Awesome post! I have been looking forward to it. I recently found that the Search and Replace plugin works for about 290/300 incidences. I keep SOP for these types of things so I will share…

    To change the last few:
    a. Login to PHPmyadmin>>Select correct database>>Search>>select option ” as regular expression” click ” Select All”>>Go
    b. Manually replace the part of the url

    This should take care of it and reduce the number of errors you find when testing. This will be a huge time saver!

  4. says

    I’m planning on keeping my URL, but I’ve put this in Evernote just in case I ever change my mind ;)

    One plugin that might well be worth installing is Broken Link Checker – just in case something slips through the net with Search and Replace, you get a list of all the broken links on your blog – which is a handy thing to know about anyway so you can fix them!

  5. says

    Hey Hector,

    Thanks for the wonderful and very detailed guide. I had a few concerns here and there with the redirection and backing up your blog.

    Now I know how to do this properly… You da man, thanks again! ;-)

    Sergio

  6. Dee says

    Do you have a post on how to move my wordpress blog from the wordpress server (blogname.wordpress.com) to my own domain which I already own (blogname.com)? I am currently redirecting the traffic from blogname.wordpress.com to the dot com, but want to move 6 years worth of information onto my own hosted site so I can integrate ads and additional plug ins.

    • says

      Hey Dee… sorry I don’t have a post about that – but if I ever figure it out, I’ll definitely write it. I’ll add that to my draft list.

      Thanks for stopping by

  7. says

    I switched my one of my blogs too! and I find the action better for my business. Have done the steps you mentioned in here.

    Spatch Merlin
    How to Blog Guide

  8. says

    Cool post! The instruction is complete and detailed which a good thing for topic like this. It’s very high-risk to change something especially when you totally don’t know what to do and you just have little information. Post like this can help you to guide steps to reach that goal without sacrificing. This is very informative. Keep on posting.

  9. says

    It’s really a good thing to have a back up, and redirecting is such a brilliant idea but It think it will affect a bit the SEO but not too much as those that needs to go back to zero. Thanks for the very useful advises. I’ll keep the reminders on mind.

  10. says

    Yes, this is what I am looking for. I am planning to migrate my WordPress account to a new site that I created last month. For this past few month, I’ve been researching about migrating of my WP to the new site. One thing I want to retain is the SEO qualities that I gain for the past years from that old site. Thank you Hector, because I’m planning to start it by next week. Thanks also for sharing.

  11. says

    excellent stuff m8 I have been wondering bout the best way round switching websites from one domain to a new one without losing seo value hope this way works as need to transfer a website without losing rankings.

  12. says

    hey Hector, I’m about to do this move over. Now my old blog is on one hosting and my new one is in another.

    My question is, once I make the move, can I delete the old blog, since I’m not going to be using the old hosting anymore, I will obviously lose that date.

    At the end of the day all I want is to keep my old blogs backlinks and make sure it redirects to the new blog.

    Thanks homie…

    • says

      Hey Joey.. I hear it takes Google about 3 months to redirect al of your link juice to your new domain. It took about 2.5 months for me to get my page rank 4 back to InbounPro.net – so to be safe, besides doing the permanent redirect, I didn’t do anything to HectorJCuevas.com so that the search engines have enough time to do what they need to do. My concern would be, if you eliminate hosting, would the redirect continue pushing link juice?

      So yea I’m recommending you to keep the old hosting, but I know you probably don’t wanna be paying for three months. I hope that helps you make a decision.

  13. says

    Thank you, thank you, THANK YOU!!! You just saved me some serious time and aggravation! Plus, you mentioned my girl Brankica so I knew I could trust you ;) This is great!!!

    -Ali

  14. says

    After looking into a handful of the blog posts on your web page, I really appreciate your way of blogging.
    I added it to my bookmark site list and will be checking back in the near future.
    Please visit my web site too and let me know what you think.

  15. says

    Step by step and really informative tutorial …. I migrated it for the first time and succeeded without a single mistake.

    Thanks a ton !!

  16. Gilbert Jerry says

    Hello Hector,
    I don’t have that much money to buy Backup Buddy plugin. Is there any Free alternative for that plugin?

    Please let me know.

    Thanks,
    Gilbert Jerry

  17. says

    Hello, Just wondering how I get passed the error that says “You do not have permission to access this page when I login to wp-admin”. Any suggestions?

    This process worked great bye the way! thanks

    Mike

  18. says

    Your awesome! This info helped a ton. But the Backup Buddy didn’t work for me, I think it was because my files were too big. Luckily my host provider has a premium backup feature that I used for that part. Everything else worked like a charm great tips!

  19. Skweekah says

    Havent read through all of the posts but Im sure that someone has suggested changing the wordpress and site urls to point to the new site under general settings. Then export the DB and re-import into the new DB. You wont need to perform a search and replace.

  20. says

    Amazing things here. I am very happy to look your post.
    Thank you a lot and I am taking a look forward to touch you.
    Will you kindly drop me a mail?

  21. says

    Remarkable issues here. I am very happy to look your article.
    Thank you a lot and I am having a look ahead to touch you.
    Will you please drop me a mail?

  22. says

    I’m amazed, I must say. Rarely do I come across
    a blog that’s both educayive and engaging, and let me tell you,
    you’ve hit the nail on the head. The problem is something which not enough folks are speaking intelligently about.

    I’m very happy I found this during my hunt for something regarding this.

  23. says

    thanks for the great walkthrough.

    Just thought I’d mention that I’m about to launch my new service at migrately.com which will help those folks who don’t want to move the site themselves.

    The service will focus purely on moving WordPress websites from one host to another. Nothing more or less than that. It will also be priced competitively!

    Launching soon, but there is a sign-up page at the above address where folks can register for more information.

    Thanks again for the post!