how to move wordpress site to new domain

How to Move WordPress Site to New Domain

how to move wordpress site to new domain

Introduction

There will come a day when you will need to move your WordPress website to a new domain. Or perhaps, for you, that day has come already. Migrating your WordPress website to another domain is a straightforward process. However, you need to get it right, else you risk losing the search traffic you’ve built.

Before moving WordPress to a new domain, there has to be a strong reason to do so. In this article, we will review the reasons that make such a move necessary. Most importantly, you will get a step by step, detailed guide for migrating your WordPress website to another domain without losing search traffic.  

 

In This Article:

  1. Reasons for migrating WordPress
  2. Steps to Move Your WordPress Website to a New Domain
    1. Create a Backup of Your Site
    2. Create a WordPress Database
    3. Upload Files to the New Domain
    4. Install Your Site in the New Domain
  3. Putting finishing touches

 

Reasons for Migrating WordPress to a New Domain

Here are a couple of reasons why you may choose to migrate to a new domain:

 

The Need to Rebrand Arises

Rebranding might mean just changing your logo. It could also mean a complete change of the business name, business direction, and service offering. If the latter is the case for you, you cannot avoid switching to a new domain.

Google Has Slapped Your Website with Too Many Penalties

When trying to grow your search traffic, it’s easy to make mistakes. While some may be due to ignorance, others are a result of one trying to game the system. Google seriously frowns at this, and severely punishes offenders.

If you have made mistakes, and the penalties have been heavy on your website, why not move your site to another domain? Recovering SEO ranking after severe Google penalties is hard, and may not be worth the effort. Move on!

 

Steps to Move Your WordPress Site to a New Domain

1. Create a Backup of Your Site

First, you need to create a backup of your WordPress website to migrate it. You would be using this backup copy to restore your site in the new domain. Also, in the event that something goes wrong during the transfer process, you have a backup to fall on. 

As a side note, if you would prefer to avoid the work and the possible complications, you can request our service, and our developers will help you with a seamless transfer.

In this guide, we will be showing you how to do this using a plugin.

Of the numerous backup WordPress plugins available, we shall concern ourselves with the Duplicator plugin. Reason: it’s simple and straightforward to use. And it’s also free!

To install the duplicator plugin, log into your dashboard, place your mouse over “Plugins”,  and then click Add New.

Next, search for duplicator plugin, and once found, install and activate it.

search for duplicator wordpress migration plugin

If the installation and activation were done successfully, you should see the duplicator tab on the left side of the dashboard. Select it, then click “Packages”.

Move WordPress to new domain - Open duplicator

Click “Create New”, and in the create new page, click “Next”

duplicator setup

Once you’ve clicked on the next button, duplicator would proceed to scan your WordPress website. Scanning takes a couple of minutes. After the scanning completes, check the “Yes, continue with the build process” box, and then click “Build”. Doing this will prompt duplicator to create a copy of your website.

Depending on the size of your site, the build process takes 3 to 8 minutes. Finally, click the “Installer” and “Archive” buttons. This should download both the installer and archive files. You are now ready to move to the next step.

duplicator installer and archive

If you followed this guide, you should have a full backup of your website on your local machine.

If you need more information about automatic and manual backups, read our complete WordPress Backup Guide.

Now it’s time to move your website to its new home.

 

2. Create a WordPress Database

Without an SQL database, there is no way your WordPress site would work. So you need to create it first.

We are assuming you’ve already purchased a domain name and hosting for the new website. If yes, then proceed with the steps below.

Log into your cPanel and scroll till you find the Databases section. Click the “MySQL Databases” icon.

mysql in cpanel

On the next page, under “Create New Database”, type in the name of the database and click Create Database.

Note: Your database name will be your cPanel username, underscore, and the name you type in the input box.

mysql databases

After creating the DB, go back to the MySQL page and scroll to the “Add User” section.

To add a new user, type in a username and password and click Create User.

mysql users add new user

Again, go back to the MySQL page and scroll to the “Add User To Database” section.

Select the user and database you just created and click Add.

cpanel database

In the next screen, tick “ALL PRIVILEGES” and click Make Changes. Your new database is ready!

Note that the steps to create a database vary with host providers. So do well to reach out to your hosting company if the steps followed here do not exactly match what you are seeing.

Now you have a copy of your website on your local disk and a fresh database, you are halfway done.

 

3. Upload Files to the New Domain

If you have followed all the steps through, you should be ready to upload the file to the new domain. The installer and archive file are the two files we will be uploading.

There are two ways to go about this:

  • Via an FTP program.
  • Upload directly from cPanel.

Via an FTP program

Connect to the new host server using FileZilla FTP. You will need a username and password to log into your server. If you are unsure of the username and password, contact your host provider.

After connecting via ftp, locate the folder into which you want to transfer your site (on the right side of FileZilla) and double click to open it. This folder is usually public_html.

Next, locate the installer and archive files you downloaded previously. By default, they should be in your download folder, and you will find them on the left-hand side of FileZilla. Ensure you do not change the name of the archive file, so as to avoid running into problems when unpacking the files. Upon locating both files, drag them to the right-hand side of Filezilla as shown in the picture below.

filezilla ftp

 

It will take some time for the upload to be completed.

Upload directly from cPanel

If for any reason you couldn’t get Filezilla, or your choice FTP program to work, you can upload with cPanel.

To do this, log into your cPanel of your new server.

Next, select “File Manager”. In file manager, open the folder you want to move your files to (usually public_html), and use the upload link at the top of the screen to upload the installer and archive files.

Move WordPress to New Domain - Upload with cPanel

4. Install Your Site in the New Domain

After uploading the files to your new host, enter the following URL in your browser to begin the installation:

http://mynewwebsite/installer.php

In place of “mynewwebsite”, put your new domain. If your files were properly uploaded, you should see the following screen.

Move wordpress to a new domain - Start duplicator

 

To proceed, you will need to accept the terms and condition by checking the button. Then click Next.

 

On the next screen, you would be asked to provide the details of the database you created previously.  Put in the host (‘localhost’ in most cases), database name, user and password, and click Test Database and after the test completes, click Next

 

 

 

On the next page, Duplicator would have detected your new domain and set your url. If not, input your new url and click Next. Your site installation would begin, and should complete without issues.

 

On the last step, check the “Auto Delete” option and proceed to login to your moved site.

Move wordpress to a new domain - Login

When logged in, duplicator would prompt you to save your permanent links. Ensure you do this so as to preserve your sites search traffic.

 

Putting Finishing Touches When Moving The Website To A New Domain

1. Handle 301 Redirects Properly

From an SEO perspective, 301 redirects are important and shouldn’t be taken tightly. 301 redirects happen when a user clicks on the link to an old site and is then redirected to the current one.

It’s important you set it up properly. This can be done by accessing the .htaccess file of the old site via FTP. Once you get to access it, open it and drop the following lines of code:

 

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


Remember to replace “mynewsite.com” with your domain.  If done well, visitors to your old website would be redirected to the new site. You may want to test this out to ensure it works.

Don’t hesitate to reach out to your host provider if you encounter technical issues.

 

2. Fix Broken Links

Broken links hurt SEO. You should avoid them. Chances are your old website is packed with lots of broken links. Even if the links are healthy, a link or two might have broken during the migration. Either way, it makes a whole lot of sense to check fix broken links in the newly migrated site.

To start with, enter your URL in this online broken link checker tool. Next, click on the “find broken links now” button. When you do, you’d see a curated list of outbound links that need to be fixed.

online broken link checker

Get them fixed with Velvet Blues Update URLs. This plugin does a great job of fixing your broken links

In addition, you may want to reach out to people linking to your site and request they update the links.

 

3. Make Updates in Google Analytics

Update the old URL in Google Analytics to the new URL. You can do this by going to Admin >>Property Settings. Change the default URL to the new one.

 

 

4. Notify Your Subscribers and Visitors of the Changes

Ensure those who have been following your website are properly notified of the changes. This can be easily done by sending out emails. Since they are a loyal audience, they won’t hesitate to inform you about bugs on your website. That way you wouldn’t lose your SEO.

 

Conclusion

Migrating WordPress to a new domain isn’t an easy task, but very much doable. The best part is that it can be done without your losing search traffic. Only ensure you carefully follow the steps in this article. We hope that you have successfully moved your WordPress site to a new domain. 

If you would rather skip the work and have us do it for you, you can request our service. For more WordPress tutorials, check our WordPress blog.