How to Migrate WordPress Site to New Domain (Step by Step)

How to Migrate WordPress Site to New Domain (Step by Step). With the requirement of low code website building platforms like WordPress, creating a website for your business, organizational, or personal use has become much easier and commonplace today. Many individuals and organizations have turned to WordPress to design and launch excellent websites without needing to consult or employ the services of a full stack web developer

First of all, WordPress domain is fully equipped with lots of features that anyone would require, irrespective of the website’s needs. However, as time goes on, you may want to migrate to a custom domain that suits your business or brand more appropriately without ruining your SEO rankings, distorting your site, or losing your web content in the process. We address that in this article, and you learn the steps to properly migrate your WordPress site to a new domain safely and conveniently.

Shall we start with How to Migrate WordPress Site to New Domain (Step by Step).

Few Things To Consider Before Changing Domains

Before moving your website from the WordPress domain to another domain, here are a few things you should know:

  • Migrating to a new domain temporarily affects your rankings on Google and other search engines as they would need to adjust to the modifications.
  • Your traffic is also going to be temporarily affected due to the migration.
  • The steps outlined in this article significantly reduce the adverse SEO impact on your website due to the migration. But you should not be alarmed by the slight changes that may persist.

To ease your understanding of the entire migration process, it has been categorized into five stages, with the steps in each stage carefully outlined below. The stages are:

1. Creating a Duplicator Package for your WordPress site.

2. Creating a database for your new domain name.

3. Unpacking your WordPress site on the new domain.

4. Setting up permanent 301 redirects.

5. Informing Google of the change.

Steps to Create a Duplicator Package (Backup) of Your WordPress Site

First, you must create a full backup of your WordPress site. You will use this backup to create a copy of your website. With this duplicate, you can set up redirects from the pages/content on your old domain to the new one.

To do this, you need a WordPress backup plugin. There are many WordPress backup and migration plugins available, but we will use the free Duplicator plugin.

Step 1

Install and activate the Duplicator Plugin

Step 2

After activating the plugin, a Duplicator menu item is added to your WordPress admin. Click on the Duplicator menu, and select “Create New” to create a new copy of your WordPress site.

Step 3

Click on the “Next” button to proceed.

Step 4

Duplicator now executes the website duplicator wizard. It will run some tests to confirm that everything is in place. If the plugin detects an issue, it prompts a warning with instructions to resolve it. If all items are ticked ‘Good’, then click on the ‘Build’ button.

 

The plugin begins to create a duplicator package of your website files. This process may take up some time, depending on your site’s size.

Step 5

Once done, the Installer and the Archive download options will be displayed. Click the “One-click download” link to download the two files to your computer.

Kindly note that the archive file contains all your WordPress files, such as your permalinks settings, WordPress themes, plugins, uploads, and other WordPress plugins’ files. At the same time, the installer script is a PHP file that unpacks the archive file to automate and execute the WordPress migration.

Follow this article about How to Migrate WordPress Site to New Domain to create a database first. 

Steps to Create a Database for Your New Domain Name

After creating a backup of your website using the Duplicator plugin, you need to create a new SQL database to unload WordPress on your new domain name. Here are the steps below to create a database:

Step 1

Navigate to the cPanel dashboard of your hosting account, scroll down to the “Databases” segment, and then select the “MySQL Databases” icon.

Step 2

Name your database and click on the “Create Database” button.

Step 3

cPanel automatically creates a new database for you. Scroll down to the MySQL Users area, provide a new username and password for your new user account, and click on the “Create a user” button. Ensure you keep the username and password safe.

Step 4

You need to give the newly created user account permission to access the database. To do this, navigate to the “Add User to Database” section. Select the database you created earlier from the dropdown menu beside the “User” field. Then choose the new database you just created and click on the “Add” button.

Great! Your database is ready. Take note of the database name, username, and password. They would be required in the subsequent step.

Steps to Unpack WordPress on Your New Domain Name

Here, you have to upload the Duplicator files you downloaded previously to your new site’s domain name.

Consequently, the Duplicator package also contains your WordPress installation. This means you do not need to install WordPress on your new domain.

Step 1

Evidently, you need to use a File Transfer Protocol (FTP) client to connect to your domain name. Then ensure that your website’s root directory is empty. 

Step 2

Next, upload the archive and installer files to the root directory, (which is likely public_html).

Step 3

After successfully uploading both files, you unpack WordPress. Open another tab on your browser and visit the URL below:

http://example.com/installer.php

Note that you should replace example.com with your new domain name. 

Step 4

While the Installer locates the archive file, check the “terms” checkbox and click the “Next” button to proceed.

Step 5

The installation requires you to configure your WordPress database information. Select your host (most likely Localhost), then fill in the details of the database you created for your new domain name earlier.

Step 6

Click on the “Next” button to proceed.

At this point, Duplicator automatically unloads your old WordPress database backup from the archive into your new database. 

Step 7

Next, it requires that you update the site URL Path. Do not change anything; it automatically detects the URL of your new domain name and its path.

If it doesn’t automatically detect the new URL, you can now change the URL to your new domain name. Then click on the “Next” button to continue.

Step 8

Duplicator finalizes the migration. Click the “Admin Login” button to enter your website’s admin area on the new domain name.

Up next with How to Migrate WordPress Site to New Domain is to set up a redirect 301.

Steps to Set Up Permanent 301 Redirects

Following, 301 redirects are used to automatically redirect your website visitors and search engines to your new domain name. Users still land on a page or post from your old domain when you migrate your website to a new domain name. Search engines also brings up pages from your previous domain in search results.

Users will therefore land on your previous website domain and be greeted with a 404 error message. But with proper 301 redirects in place, users are automatically redirected to those pages already set up on your new domain.

This helps your SEO rankings remain intact and relevant in search results when users search for related topics or subjects on your previous website domain.

There are two methods to set up 301 redirects. You can set up the redirects using a plugin or manually.

Method 1: Using All in One SEO (AIOSEO) Plugin

Step 1

You would need to install and activate the All in One SEO plugin to your former domain. 

Note: To access the redirect manager add on, you will require at least the Pro version of the AIOSEO plugin. You can also activate AIOSEO on your new WordPress site to further boost your traffic and search engine rankings.

Step 2

After activating the plugin on your old domain, go to the AISEO Redirects page and click the “Activate Redirects” button.

Step 3

Then, switch to the “Full Site Redirect” tab, toggle on the “Relocate Site” switch, and then enter your new domain name beside the “Relocate to domain” option.

Step 4

Ensure that you click on the “Save Changes” button to effect your new settings.

Method 2: Manually Set Up Redirects to New Domain

This method requires you to manually edit the WordPress .htaccess file on your former domain name.

Step 1

Therefore, use FTP to connect to your old site and edit the .htaccess file. The file can be located in the same directory as your wp-includes or wp-admin folder. 

Step 2

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

#Options +FollowSymLinks

 

RewriteEngine on

 

RewriteRule ^(.*)$ 

 

http://www.newsite.com/$1 [R=301,L]

Note: You must replace newsite.com with your new domain in the code above.

Step 3

After applying these changes, go to your old domain name. If it automatically redirects you to the new domain, then you have successfully set up 301 redirects

If not, it implies that you did not set up the redirection properly or your server does not support redirect rules. You may have to contact your web hosting company’s support team to turn on RewriteEngine.

Steps to Inform Google About Your New Domain

After successfully moving your website to a new domain and setting up redirects, you need to notify Google that your website address has changed. This is very important as it will enable Google to locate your new website domain and begin to show it in search results immediately.

Step 1

Ensure that your old and new domains are included to the Google Search Console as two distinct properties.

Step 2

Choose the old domain name as the active property on your Google Search Console.

Step 3

Click on the “Settings” menu from the left column and select “Change of Address.”

Step 4

Next, go to the “Update Google” section, select your new domain, and click on the “Validate & Update” button.

That’s it! Google will now save your changes and confirm that your old domain is automatically redirecting to the new domain.

Step 5

Follow the step by step wizard to submit your request for a change of address on the Google Search Console screen.

After following the steps in all the stages listed above, you will successfully migrate your WordPress website to your new domain. However, an important thing to do is to notify your users about the change of address. 

While the 301 redirects effectively redirects users to the new site automatically, it is always a good idea to publicly share the news of your migration with your users. 

You can make a blog post on your new site and share the links on your social media. You also make use of an email newsletter or push notifications to inform your audience of the new site address. 

Doing this helps to reinforce your new domain name on your website users or visitors directly, helping them to remember the new address easily. Also, it allows you to have people test your website across various browsers and devices. You get useful feedback on bugs and accessibility issues users may encounter on your new website, enabling you to improve the site further.

Thank you for reading How to Migrate WordPress Site to New Domain. We conclude this article.

Deploy SAML SSO Single Sign On (SSO) Security Plugin

How to Migrate WordPress Site to New Domain (Step by Step) Conclusion

Summarizing, when you consider the amount of work you put into setting up your WordPress website, the thought of migrating to a new domain may be overwhelming. Concerns of loss of data, distortion of the website structure, loss of content, and more importantly, a plunge in SEO rankings may pose a risk factor.

With the steps clearly outlined in this article, there is no need to worry about any of the above mentioned issues. You find that migrating your WordPress website to a new domain very effortless without causing any damage to the already existing progress you have made on your old domain. Go ahead and follow the steps succinctly and enjoy your efficiently migrated WordPress website.

Avatar for Kamso Oguejiofor
Kamso Oguejiofor

Kamso is a mechanical engineer and writer with a strong interest in anything related to technology. He has over 2 years of experience writing on topics like cyber security, network security, and information security. When he’s not studying or writing, he likes to play basketball, work out, and binge watch anime and drama series.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x