How to Move WordPress to a New Domain (Without Losing SEO)

How to Move WordPress to a New Domain (Without Losing SEO)

Are you willing to move your WordPress site to a new domain? 

While moving to a new domain, the thing that is affected most is the SEO ranking of a site. As a website owner, You may be afraid of losing all the efforts you put into optimizing your old website for search engines.

Therefore, You have to handle this process very carefully.

Although you can’t avoid temporary SEO fluctuations when moving your website to a new domain, you can surely minimize its effects.

In this write-up, we will explain to you both the ways of how you can:

  • Move WordPress to a new domain
  • Maintain your SEO rankings by using the appropriate redirects.

Why move WordPress to a new domain?

There may be different reasons you wish to change to a new domain, such as you want to go along with a new domain name and like to rebrand from one name to another, or you want to merge your multiple sites into a single domain, or your old domain is undergoing some issue, and you need to start from a new one.

How the process takes place?

While moving a website to a new host, the DNS (domain name system) is changed for directing the old domain name to the location of a new host. 

In that case, Search engines will have to adjust the changes and crawl your site at the new location, which affects the SEO. In addition, it also affects your search traffic.

If you are worried about it, Don’t worry, this is normal, and every website faces this situation while moving to a new domain.

Note: This tutorial is only for switching a domain name and not moving a WordPress site to a new host. 

Step 1: Create WordPress site’s Package using Duplicator

To start, You have to create a full backup of your WordPress site. This backup will be required to create a duplicate of your website so that you can properly set up the redirects from your old domain name to the new one.

There are many WordPress backup plugins available in the market, but we will use the Duplicator plugin, which is the finest free backup and migration plugin available.

Now, you have to install and activate the Duplicator plugin on your old domain name. You can see our tutorial on how to install a WordPress plugin if you find it difficult to install.

After activation, the plugin adds up a Duplicator menu into your WordPress admin area. 

Click on the Duplicator menu, and then select the ‘Create New’ tab to create a new package of your WordPress site.

After that, you have to click the Next tab to continue.

Now, the Duplicator plugin will run the website duplicator wizard. It will see if everything is in order or not. 

If it finds an issue, then you will notice a warning with instructions and if everything is marked ‘Good,’ then click on the ‘Build’ tab.

After this, the plugin will start creating a duplicator package of your website files, and then you will notice download options for the Installer and the Archive package. 

You have to click the ‘One-click download’ link to download both the files to your computer.

The archive file is the copy of your WordPress files, which includes your permalinks settings, plugins, WordPress themes, uploads, and any other files created by your WordPress plugins. And the installer script is the PHP file that will automate and run the WordPress migration process by unpacking the archive file.

Step 2. Create a SQL Database for Your New Domain Name

Now, you have to create a new SQL database to unpack your WordPress on your new domain name.

To create a database, visit your hosting cPanel dashboard, and scroll down to look for the ‘Databases’ section.

Now, click on the ‘MySQL Databases’ icon provided in the database section and then click to create a new database.

After that, Enter a name for your database and click on the ‘Create Database’ tab.

Now, cPanel will create a new database for you. 

Then, look for the MySQL Users section there and enter a username and password for your new user.

After placing the details, click on the ‘Create a user’ tab. 

Now, you have to change the user permissions as the new user you just created doesn’t have permission to work on the database.

For that, scroll down to the ‘Add User to Database’ section and select the user you created from the dropdown menu. Below that, select the new database you created and click on the Add tab.

And that’s it; now the user is ready to unpack your WordPress on your new domain name. 

Remember the database name, username, and password because You will need them in the next step.

Step 3. Move WordPress on Your New Domain Name

Do you remember the files you downloaded in the 1 step? You have to upload those Duplicator files to your new domain name.

To start, you have to connect to your domain name using an FTP client such as Filezilla. 

When connected, confirm that the root directory of your website is empty.

Then, upload the archive and installer files to the root directory.

When uploading is completed, you have to unpack WordPress.

To do that, open a new browser tab and enter the following URL: http://example.com/installer.php

Note: Replace example.com with your new domain name.

Now, it will launch the Duplicator migration wizard, and the Installer will search for the archive file. You have to check the terms checkbox and click on the Next tab to continue.

Now, you have to configure your WordPress database details.

Enter the database details you created for your new domain name in the earlier step, and the host will probably be localhost. Then, click on the next tab to continue.

The Duplicator will upload your WordPress database backup into your new database from the archive.

Next, you will see the updated data options. You don’t have to change anything as it automatically detects the new URL and path of your domain name.

If it doesn’t pick it up, you can change the URL to your new domain name and click on the next tab to continue.

Then, click on the ‘Admin Login’ tab to visit the WP admin area of your website on your new domain name.

That’s it; you have successfully moved your WordPress site to a new domain. Now, to keep SEO, you have to follow the steps below:

Step 4. Set Up Permanent 301 Redirects

The first step to keep your SEO safe, the users arriving at your old domain name should be forwarded to the new domain. This is done by 301 redirects which are very important for SEO and user experience. 

Adding 301 will allow you to redirect users and search engines to your new domain name automatically.

For example, with proper 301 redirects, anyone who visits your olddomain.com will automatically get redirected to newdomain.com. 

To keep your redirects properly, you will have to keep your old WordPress installation active so that it can redirect to your new domain name continuously.

Now, to manually set up redirects to a new domain, you have to edit the WordPress .htaccess file on your old domain name.

To do that, you have to connect to your old site using an FTP client and then edit the .htaccess file.

Look for the .htaccess file in the root directory of your site. That is the same directory that contains the “wp-admin” and “wp-content” folders.

Open the .htaccess file and paste the given lines of code at the top: 

 #Options +FollowSymLinks

RewriteEngine on

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

Note: You have to replace newsite.com with your new domain name in the above code.

After that, try to visit your old domain name. You should be automatically sent to the page on your new domain name.

If you did not redirect to your new domain, then this suggests the redirection is not set up properly, and your server doesn’t support redirect rules. You have to contact the support team of your web hosting company.

Step 5. Notify Google About Your New Domain

As you have moved WordPress to your new domain name and successfully set up redirects to your site, you must notify Google about the change in your address. It will help Google find your new website domain as quickly as possible and show it in search results.

For that, you have to make sure that both your old and new domains are added to the Google Search Console as two different properties. You can follow the steps in our tutorial to know how to add your site to the google search console.

Then, you have to select the old domain name as the active property in your Google Search Console dashboard.

After this, click on the Settings menu and click the ‘Change of Address’ option.

Now, select your new domain under the Update Google section, and click on the ‘Validate & Update’ tab.

And that’s it; Google will validate that your old domain is redirecting to the new domain and save the changes.

After that, Google Search Console will display a change in address form to submit your request.

Step6. Notify Users About your New Domain Name

Although you set up redirects to your domain name and they are working properly, it is always good to notify your users about your new domain. For that, you can write a blog post on your new site and share it on your social media platforms such as Facebook, Twitter, Instagram, and others.

If you use a paid newsletter or push notification subscribers on your site, then you can send out notifications to them, as well.

This can be helpful to notify your users about your new domain.

To conclude- Moving your site to a new domain may affect your SEO and search traffic. Although you can’t completely avoid temporary SEO fluctuations, you can surely minimize its effects.

We hope this post helped you move your WordPress site to a new domain name and set up redirects to direct traffic from your old domain to a new one. You can also notify google and users about the change in domain.

Leave a Comment