Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Properly Move WordPress to a New Domain Without Losing SEO

Last updated on by
Follow WPBeginner on YouTube
How to Properly Move WordPress to a New Domain Without Losing SEO

Recently one of our users asked for our help in moving their WordPress site to a new domain. We thought it would be nice to share this process on WPBeginner, so it helps others who are looking to do the same. In this article, we will show you how to properly move your WordPress site to a new domain name without losing your SEO rankings.

Before You Start

Before you start, we want to emphasize a few things. The process of switching to a new domain will temporarily affect your search engine rankings as Google and other search engines adjusts to the changes. Yes, this will also temporarily affect your search traffic as well. Please keep in mind that this is normal, and it happens to all sites that switch to a new domain.

However, the best part is that you can dramatically decrease the negative SEO effects that migration can have by following this guide. We will show you the right way of moving your WordPress site to a new domain name, setting up proper 301 redirects, and notifying search engines.

Please note that this guide is not for moving your WordPress site to a new web host. This is for switching a domain name. Yes, while the process is similar, there are more things involved in this process as you set 301 redirects and more.

Pre-Steps

In this guide, we are assuming that you have your WordPress site setup on oldsite.com, and you are trying to migrate it to newsite.com. We are also assuming that you have a web hosting account, and you are familiar with your web hosting control panel.

You will also need to know how to use FTP.

Step 1: Create a Full Backup

Before you do anything, it is very important that you create a full backup of your WordPress site. There are tons of plugins and solutions out there that allows you to create a backup. You can use VaultPress, BackupBuddy, BackWPup, or WordPress backup to Dropbox.

Step 2: Moving your WordPress Site

Once you have created a complete backup of your old site, it is time to start the domain migration process. First thing you need to do is install and activate the Duplicator plugin in your WordPress installation on your old site. Once activated, the plugin adds Duplicator menu item in your WordPress admin. Click on the Duplicator manu, and you will see a screen like the one below. Simply click on the create button to create a new package.

Click to create a duplicator package of your WordPress website

Clicking on the create button will start the duplication process, and the plugin will ask you to give your package a name. By default, it will use your website’s name with a date prefix, but you can give it any name you want. The plugin will start creating a zip package of your WordPress database and all your files. This may take some time depending on how much content you have. Once the process is complete, then you will be taken to Duplicator packages screen. Download both the package and installer files on your computer.

Duplicator package and installer for your WordPress website

Next, you need to open your FTP program and connect to your new site. Make sure that the root directory, or the directory where you want to copy your website is completely empty. Upload the installer.php file and your package zip file to the new site. After uploading the files, simply launch the installer.php in a web browser. You can access it by going to http://www.newsite.com/installer.php

Install a duplicate copy of your WordPress website from duplicator package

The installer will ask you to provide database information for the new site and check the box for Table removal. Make sure that the database you are using is empty, and does not contain any data that you would need later.

Read the Warning and Notices section and check the box that says “I have read warning and notices”. Next click on the “Run Deployment” button. The duplicator installer script will extract the zip package, install your database from old site, and install WordPress with your themes and plugins. This process may take some time depending on how big your site is. Once the installation is finished, the plugin will show you the update page.

On the update page, you will need to update your URLs. The duplicator will try to guess your old and new URLs on its own, but you can also enter URLs manually and click on the Update button. The plugin will then replace all instances of oldsite domain name with newsite domain name.

Update URLs

Once the entire process is complete, the Duplicator plugin will remind you to take the post installation steps. The first step is to re-save your WordPress permalinks. Login to your new site’s WordPress admin using the same username and password that you had on the old site. Go to Settings » Permalinks in your new site’s WordPress admin and click on the save button.

After that delete the installer.php, installer-data.sql and the installer-log.txt files from your root directory using FTP.

Lastly, check your new website for broken links, missing images, posts and pages. Please make sure that everything is working and all the functionality is there.

Now you have successfully moved WordPress to a different domain name, but the process is not done. We still have to add the proper 301 redirects and notify the search engines to keep all your SEO rankings.

Step 3: Setting up Permanent 301 Redirects

Setting up a permanent 301 redirect is very important for both SEO and user experience. This allows you to redirect users and search engines to your new site. In other words, whenever someone lands on one of your old posts or pages, then they will be automatically redirected to your new site.

To setup a permanent 301 redirect, you need to connect to your old site using FTP and edit the .htaccess file. This will be located in the same directory as your wp-includes or wp-admin folder. Open the .htaccess file and paste the following code at the very top:

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.newsite.COM/$1 [R=301,L]

Note: Replace newsite.com with your domain in the above code.

Once you have applied these changes, then visit your old site. It should automatically redirect you to the new site. If it doesn’t, then it means the redirection is not setup properly.

Step 4: Notifying Google About the Change

Login to your Google Webmaster Tools account to submit a change of address. Basically click on your site and look at the left menu under configuration. This allows you to notify Google about your new site and the transfer. Yes, you have to verify your new site, so go ahead and do it.

Google Webmaster Tools Change of Address

Step 5: Notify Users

While the 301 redirects do the job, it is always good to make a public announcement about the migration. You can do this by simply writing a blog post on your new site. This can be helpful in a lot of ways. First and foremost, your users are more likely to remember the new domain once they read about it. Second, you can ask your users to let you know if they see any bugs. This can be very helpful because you alone cannot test your site in all different type of browsers and system environments. Besides it always help to have a fresh pair of eyes looking at it.

We hope that this tutorial helped you move your WordPress to a new domain name. If this tutorial helped you, then please don’t forget to share it. We appreciate all retweets, likes, and +1s. Lastly, let us know about your experience and/or questions by leaving a comment below.


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. Brooke Browne says:

    This is great, thank you! I’m happy to see the plugin you recommend is still alive and kicking, so many years after posting this.
    One question I have is if I need to do anything different given my scenario. I have the live old domain, and I have a live dev site that is just simply not indexed. The dev site is the one I want to push to the new domain, so I figured I could skip updating the old domain altogether. It’s fine to just do this process with devwww.olddomain.com > newdomain.com, right?
    I’m just the web designer and recently lost my developer, so this is all new to me, and scary. Thanks!

  2. Jasmine says:

    Hi, I want to transfer my blog post from 2 old different niche sites to 1 new authority site. The 2 old niche websites have always been in maintenance mode but register with GWMT.

    With that being said, after I transfer my 20+ post total to the new site,
    Do I have to still do 301 directs and notify Google of change of address even though it hasn’t been indexed?

  3. Sugianto says:

    Nice post. help me a lot. but now i got new problem after do redirect. i move my old site to new sub-domain name. Now i want to install new fresh wordpress to my old domain name but after instalation when i want to access wp login area, there still login to my new sub-domain site. how to fix that? please help

  4. umukub says:

    If i have oldsite as deindex search engine, then I make redirect to new site. Whats the new site will have impact deindex like old site ?

    • WPBeginner Support says:

      If your old site was penalized by search engines, and your new site has the same content. Sooner or later your new site will be penalized and deindexed as well.

  5. Badger says:

    I’ve spent the past year as managing editor of a reasonably popular academic blog. I’m thinking of using duplicator to create a copy of the blog to be stored secretly on a subdomain of my own personal website. That way, I can show prospective employers a record of my editorial work. Do you anticipate this causing any problems for the actual blog as long as I tell search engines not to index the duplicate and don’t set up 301 redirects or notify google?

    • WPBeginner Support says:

      You can do that but search engines may still crawl your website. To be extra cautious we would recommend you to password protect the entire subdomain with .htaccess. This way search engines will not be able to crawl it and you can send a link along with username and password to anyone.

  6. Karan Bhagat says:

    Hey,
    I have a confusion. Suppose I own a site oldsite and I have migrated it to newsite by redirecting it and the oldsite domain name is about to expire, do I need to renew it every year along with the newsite.com ?

  7. Carmia says:

    Thanks so much for this helpful tutorial! I have successfully moved my site to a new domain with your help.

  8. Prince says:

    Don’t use duplicator it’s not copying fonts. changing with times new roman

  9. Andy says:

    quick question do you know what happens to Facebook likes to individual posts if I change domains and make the 301 redirect for the old one.
    Do they carry over as it is a 301 redirect or will the like count drop to zero?

  10. WPBeginner Staff says:
  11. Carol Faughnan says:

    Hi i transferred a subdomain to the main domain and the home page is without the subdomain prefix but the rest of the pages still have the prefix in place. How do I remove it? And do I still need to redirect the URLs in webmaster?

  12. WPBeginner Staff says:

    6-12 months just to be on the safe side.

    • Mathieu says:

      Thanks. Another question: you say that the search engine rankings will be temporary affected. How great is the loss in organic visits and how long does it last?

  13. Mathieu says:

    Thanks you for such a comprehensive and easy guide. One question: how long do you advise keeping the old domain/site after switching to the new domain?

  14. Tauseef says:

    I have a wordpress.org blog. Now I changed from .com to .org, I was getting anywhere from 4,000 to 400 traffic per day. After the change over I’m lucky to get 160 max and When I went from .com to .org the domain is the exact same one.
    why would this be? My domain is still .com, I just changed from wordpress.com to wordpress.org

  15. Alex Sol says:

    Okay, I know this is an old article but I hope I can still get a reply ;)

    1. I am thinking of moving blog.old-domain,com to newdomain.com… So is duplicator going to change all links properly? For instance, if the old site had an article: blog.old-domain.com/this-is-article, will it be now created as newdomain.com/this-is-article ?

    2. Once I redirect using 301, should I do anything with the content on the old site? Should I leave it or delete it? If I do leave it, I guess I have to keep renewing the old domain as well?

    Thanks!

  16. stew7645 says:

    Thanks, I found this guide extremely useful and well explained. Managed to move my site from one domain to another in about an hour

  17. WPBeginner Staff says:

    Yes, it is a good idea to submit your sitemap to Bing as well.

  18. Christian Locke says:

    great tutorial, major time saver. I notified Google of the changes through the webmaster tools and it was a breeze. Just want to ask, do you recommend also doing the same thing in Bing webmaster tools? I don’t really put much emphasis on Bing in general but if it would help somehow, I would do it. The process is more complicated and if it can be avoided that’s really what I want to hear but if it’s a good idea, I will take the time to do it. Thanks for offering us this tutorial and taking the time to reply to our questions! :-)

  19. Joe says:

    This article was definitely not written for a beginner. I got stuck around here: “Make sure that the root directory, or the directory where you want to copy your website is completely empty. ” What is the root directory? Then I don’t know what credentials to use to log in anyway.

  20. markyh2904 says:

    Sorry I’m late to the party but I’ve only just come across this post when looking how to move one of my WP sites :)
    I have been penalised by G (penguin 3) on one of my music sites as I stupidly bought too many bad link packages from fiverr a few years ago and my domain is just considered spammy now.
    Will this work if I want to swap my site content to a new domain BUT not 301 my old site to the new site? And if so,should I de-index my old site immediately after the transfer or before?
    Thank you in advance

  21. Hicham Alaoui says:

    Hello,

    I displaced my website “http://www.mywebsite.com” to “http://www.mywebsite.com/blog” and after a few months, I displaced posts as before and I deleted all content from /blog.

    The problem is that Google still reference the same article as duplicate content, I do the redirection links manually, but there are more than 9000 links deemed not found, I will not finish!

    I tried to solve this problem with the tool of Yoast “https://yoast.com/wp-content/permalink-helper.php,” but either it doesn’t work for me, or that I haven’t understand how.

    Do you have a solution please?

    Thank you.

  22. Tom Durkin says:

    I’ve not thought about looking for a plugin to handle this, will have to take a look!

  23. John R. Meese says:

    Glad to do it!

  24. WPBeginner Staff says:

    If your temporarily URL was public and you didn’t block search engines, then there is a chance that search engines may have crawled the URL. Sometimes a URL may not appear in search index but is still out there and can appear at any time. So you should setup a 301 redirect just to be safe.

    On the other hand, if you are pretty sure that it was not crawled or indexed by search engines then you don’t need to set up 301 redirect.

    As for step 2. please see our guide on how to use FTP to upload or edit WordPress files.

  25. Chad says:

    If I am just moving from a temporary URL to my permanent URL, should I still do a 301 redirect? Also, if I didnt submit the site to GWT’s yet, I assume I don’t have to change address in GWT’s, just submit to GWT’s after the domain transfer is done, correct? Lastly, in the middle of step 2 above, “Next you need to open your FTP and connect to your new site”….what dose this mean exactly? Open FTP and connect to what? Thanks anyone, pretty newbie here.

  26. WPBeginner Staff says:

    Did you take a look at our free blog setup service.

  27. WPBeginner Staff says:

    Beth, we have a tutorial on how to move a WordPress.com site to Self Hosted WordPress.org

    As for your concern about Google Indexing a site that you don’t want to be indexed. You can add a robots.txt file to the root directory of that domain and instruct Google and all other bots not to crawl or index that site.

    • Beth Terry, CSP says:

      Thank you! You guys are great! I’m a little ahead of the game and did some things out of order. I moved all content to a newly redesigned blog site at a subdomain Then I switched around the theme, etc on the WP.com blog.

      I already own the name of my active blog and have been using that for 7 years at the dot com site. So I do have some readers and a ton of content and I have it linked to Twitter and LinkedIn.

      I would think that pointing CactusWrangler to my new subdomain blog should bring my indexing and followers with it, but maybe not. All the content and media is on the new site. I did it all with Jetpack plug in… So am I just ready to tell GoDaddy my new DNS information? Unfortunately, Jetpack’s WP support is out till Sept 24!

      Yikes ! My goal is to make my website and blog look similar so the linking back and forth is smooth and congruent. Once I get this done, I need to switch the themes on the main website which is an active site since 1998.

      I dont’ know how you do this for a living! My eyes are bleary and my brain is mush! ;-D

  28. Beth Terry, CSP says:

    Does this also apply to moving from WP.com to WP.org? I created a subdomain on my website for my blog so I could create a new design. I have had a blog on WP.com and moved the content to the new design. Now I have two identical sites and I need to shut down the .com one before google marks my new one as fake. I’m trying to figure out the next steps. I haven’t technically gone “live” with the subdomain yet, so my URL for the blog still points to the .com site. The comment below about subdomains concerns me. Is there something I need to watch out for?

    I know I’m about 3 steps away from solving this, just not sure how to proceed. Thanks for an informative article!!

  29. David says:

    I was dreading moving my wife’s large site to a new URL. Your instructions are the clearest I could find and the process was not so bad after all. Thanks so much. Best of all, it all works. Still have a few page titles, and SEO settings to manually change. Now I don’t have quite the depth of gratitude in the bank with my wife as I had hoped for, but that’s all for the best, I suppose.

  30. Jenny says:

    This was amazing. An absolute lifesaver. Great article!!

  31. Keshav says:

    Hi, I want to move my wordpress blog from blog.yoursite.com to news.yoursite.com Also, I want to change the URL structure from /postname to /post_id/postname

    How shall we proceed with this for URL redirection?

  32. Alberto says:

    Hi!
    I have a multisite install. I want to move just one website from that installation.
    I already have the new website up and running and just need to make the 301 redirects.
    The website I’m moving is oldsite.com/the-site and I’m moving it to newsite.com
    How can I do this without redirecting all the websites in the multisite installation?

  33. WPBeginner Staff says:

    No, if your users can still access your site and posts at the same URLs as they did before then you need to set up 301 redirection. But if they can’t then this means search engines cant do that either. That way you will be losing a lot of traffic and your search rankings as well.

    • Susan Finch says:

      Well, since the old domain will simply be a redirect to the new one, this can be problematic since results are all absolute in search engines. Guess I have some 301s to create. Thank you for the quick reply.

  34. Susan Finch says:

    We are simply changing our WP URL – not moving. Are 301 redirects still needed if we follow permalink and notify users steps?

  35. Simon Somlai says:

    The url currently looks like this http://www.oldsite.com/newsite.com how do I change this to a regulat newsite.com?

  36. Vishal Kumar says:

    Simple yet effective… Thanks WPBegginner team.

    I have one more query.. It has been 20 days i have moved my site to the new domain successfully by following the above steps. Now given that the old domain is still live and redirects users to new domain, should i consider deleting the old domain data to avoid duplication penalties. Kindly suggest…

  37. Tim Ludy says:

    Great resource thanks! Is there a way to only redirect the blog articles and not the entire site? We’re creating a whole new website for one area of a business so only some of the old websites pages are switching to the new site and the rest are staying on the old site.

  38. Om Livin' says:

    Quick question about Pinterest…would I need to go and change all my pinned links??

  39. Hieu Nguyen says:

    Excellent! Just what I’m searching.

    But if I don’t want to move the WP site, is it possible to just change the URL only?

  40. WPBeginner Staff says:

    you can exclude subdomains from your .htaccess file by adding this line just before the RewriteRule line :

    RewriteCond %{HTTP_HOST} !^subdomain.example.com$ [NC]

    • Shah Jahan says:

      Hi, Thanks for the reply, i have added the code,

      RewriteCond %{HTTP_HOST} !^subdomain.olddomain.com$ [NC]

      RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

      now when i try to access subdomain.olddomain.com it redirects to newdomain.com/subdomain.olddomain.com

  41. Shah Jahan Labar says:

    I have some sub domains, when i tries to apply the redirect rule my subdomains also got redirected .

  42. Kasa says:

    What about redirecting subdomain to new different domain?
    Is process the same, as you cant change address for subdomain in webasters tools.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.