How to Move WordPress Site to New Domain

How to move WordPress site to new domain without losing your SEO. Find out how you can safely migrate a website and keep your rankings!

Websites are never “static”, we always need to run updates, manage, create content etc. And sometimes, we need to move from one domain to another. While there are clients who run Wix, Square or Shopify websites, today we’ll learn how to PROPERLY move a WordPress website from one domain to another, WITHOUT losing too much SEO “juice”.

Will I Lose SEO Rankings Because of the Migration Process?

Before we delve deeper, let’s get things straight: anytime you do serious work on the website (implement a new design, move to another domain name, switch platforms) a shift in rankings will happen.

Most of the time it’s a small decline, followed by an increase in rankings, sometimes the decline is longer. There are ideal situations when you just go up, provided the change was done with proper SEO in mind, not breaking your optimization efforts.

Anyways, in most cases, the change NEEDS to happen, and in this tutorial I’ll try to share the best ways to move your WordPress website to a new domain, without losing too much in the SERPs. As we acquired the premium domain name for our business, here you’ll see how I migrated Web Design NJ from web-design-nj.com to webdesignnj.com, making sure to cover all our bases.

Why Would You Have to Move a WordPress Website to another Domain?

No one wants to go through this hassle without a good reason, here is why you might consider moving WordPress websites from one domain to another:

  • acquire a new business – in this case, you might want to consolidate the websites or migrate the old domain address to your main one;
  • get a better domain name – we started out with a non-premium domain name and, as soon as we got a better price for webdesignnj.com, we bought it and prepared the previous domain for transfer.
  • being slapped with a manual penalty – while it’s possible to recover from this and we have helped clients before, sometimes just moving to a new domain will do the trick.

Whatever your reasons are, we’ll make sure to give you insights to migrate websites and not lose too much of your

What You Need Before Moving WordPress to Your New Domain

  • both domain names are under your control – don’t start migration to a new domain unless it’s already yours. Premium domain names take at least 10-15 days to be transferred into your account and sometimes you might not even get them.
  • you have access to 2 separate hosting accounts (same server or not, doesn’t matter). This is not for wordpress.com hosted websites, it’s for self-hosted WordPress. Of course, if you’d like me to create tutorials for that as well, let me know and I’ll write it.
  • access to Google Analytics and Google Search Console – I’m an SEO consultant, so we worry about tracking traffic and rankings, even on the new website.
  • Deactivate any firewall and caching plugins – these will fire up a lot of errors otherwise.

You’ll also need to set up your .hosts file on your computer, look for backlinks, know how to do redirects etc. But, don’t get stressed, we’ll cover everything in this article and, if needed, add more details as readers request them.

Other WordPress migration experts also mention putting the source website under maintenance mode, so that your team doesn’t work on it, during migration. If you don’t expect too much traffic (or are doing the transfer at midnight), you can skip this step.

How to Move WordPress Website Manually and with a Plugin

Step 1: Prepare Website for Migration

Before we even consider moving websites, let’s make sure the “source” website is 100% OK. This means properly updated plugins / WordPress version, NO ERRORS, clean and optimized database.

Any issues that your website has now, might break the new website, before you even finish the installation.

I have disabled the cache plugin (we use WP Rocket on our websites), in order to make sure we don’t have errors firing up after migration.

We also need to make sure PHP versions are updated on both hosting accounts.

Create proper backups after EACH stage, so that you are not left with 2 broken websites and blame it on me 🙂

Repair / Optimize Source Database

Now that we get ready to migrate, I like to take a look in PhpMyAdmin to the existing database and make sure there’s no “bloat” in it. While we run our websites on a daily basis, a lot happens in the database. So, I run 2 utility options: REPAIR (to make sure nothing is broken) and OPTIMIZE. 

This way the database is as slender as possible and has nothing extra that would take up space / bandwidth when moving.

With small websites this isn’t really an issue, but, when you have a pretty hefty database, optimizations and repairs can really make a difference.

Step 2: Duplicate the Source Website

Install the Duplicator Plugin

Duplicator is a free plugin that allows you to migrate your WordPress website. There are many possible plugins, but this one has a good rating and  has been used by over 1 million websites.

Look for it in the WordPress repository, install and activate.

Install the Duplicator Plugin

Create Package

In order to move the website from one domain to another, we need to create the backup / package.

We now have the installer and also the archives of the source website. Time to prepare the new one.

Step 3: Create the Database for the NEW Website

If you are using cPanel, log into your hosting account and navigate to MySql Database Wizard. This will allow you to create a new database for the website you build.

Set up a database name, an user name and use the generate password option. As soon as you got that long weird password, copy-paste it on a notepad file for further use (you will need to know these credentials to migrate the website and set up the new WordPress.

In order for your website to work, the username you have created needs to have FULL privileges to the database. 

Step 4: Upload the Installer and Archive on the NEW Hosting Account

Again, if you are using cPanel, it’s easy to log into your FTP client of choice and in the ROOT section of your new website you will need to upload both the install.php file and the archive.zip

As soon as it’s done, go to yournewdomain.com/installer.php

Now it’s time to add the info’ you saved few minutes ago (database name, user and password).

Step 5: Log into Your New Website and Clean Up

As soon as the Duplicator has finished its work, you are prompted to make sure the installer and archive are deleted. It’s normally done automatically, as soon as you log into the new website, but make sure it’s all solved. Leaving these on the website is a huge security and maintenance issue.

Things to Do After You Copy WordPress Site to Another Domain

So your brand new website is up and running. Nothing breaks, no errors, no issues. Let’s see what else you can do, in order to make sure you have a perfectly set up website:

Step 1: Remove and Redirect the Duplicate Website (Old Domain)

Although your transfer has been successful, you are into the middle of an SEO nightmare: running duplicate websites. Your old domain has the same website running as the new one. 

It’s now time to solve this issue.

There are 2 ways to redirect a WordPress: keep it active and redirect via your redirection / SEO plugin of choice or, set up an .htacess redirect and, as soon as it’s working properly, DELETE the content from the old website.

I personally like the latter option, as any WordPress websites that are not properly maintaned and updated will eventually get hacked. As the 2 websites are most likely on the same server, you can compromise the entire server by not doing some proper housework.

So, 

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

As I am pretty lazy, I’ll log into cPanel on the OLD website, navigate to public_html, open .htaccess and copy the code above. I will change https://www.newsite.com with https://webdesignnj.com, as it’s the one I redirect to.

If you’ve done your job right, navigate to the old website and it should immediately redirect to the new one.

I will now delete all the files on the old website (still in the file manager, in cPanel), leaving only the .htaccess with its redirect.

Optional: Transfer WooCommerce Payments to New Website

If you used WooCommerce on your websites, you will need to confirm that your new website should now be connected to it.

Change All Backlinks You Have Access to, So That You Don’t Rely on 301 Redirects Only

If you’ve done your job right, all traffic that comes to the old domain name, is not properly redirecting to your new website. Even so, a good housekeeping job is to make sure you don’t rely on redirects, if you really don’t have to.

So, as soon as I have moved the website to webdesignnj.com, I went to some of the website in our portfolio and changed the links to the new website. We also updated Google Business Profile, Facebook, Linkedin etc.

Announce the Change to Your Following

If you have an email list, make sure to notify your followers of the big news. Maybe even create an event for this, give some prizes, make noise.

Avatar photo
Ramona Jar

SEO consultant and founder of Web Design NJ, Ramona Jar loves to find effective marketing gaps for her clients. With 2 decades of web design and SEO experience, she is the right partner for your business growth online. When she's not working online, you can find her playing tennis with her daughter.