Want to move your WordPress blog to a new address? Well, you’re in right place. In this guide, we will show you the proper way to move WordPress to a new domain without losing SEO.
Before starting I should warn you that moving your WordPress site to a new address might cause temporary SEO fluctuations but you can definitely minimize the impact and quickly regain your search traffic and rankings.
Here’s a quick summary of what we’re about to do today.
- Use Duplicator plugin to create a migration package of your WordPress site
- Create a database for new domain name
- Upload your migration package to the new domain
- Setup Permanent 301 redirects on your old domain
- Update your domain name on Google Search Console
Before we get started…
I’m assuming that you have your WordPress site setup on oldsite.com, and you are trying to migrate it to newsite.com.
I’m also assuming that you already have a web hosting account, and you are familiar with your web hosting control panel.
You will also need to know how to use your hosting control panel. Once you have your new domain name added to your hosting cpanel, you’re ready to start the process.
Step 1: Use Duplicator plugin to create a migration package of your WordPress site
Let’s start by installing and activating the Duplicator plugin on your old domain name.
Once activated, the plugin will add a Duplicator menu item in your WordPress admin. You need to click on the Duplicator menu, and then click on the create button to create a new package.
After that, you will be asked to click on the Next button to continue. Duplicator will now run the website duplicator wizard. First, it will run some tests to see if everything is in order. If all items are marked ‘Good’, then click on the ‘Build’ button.
The plugin will now start creating a duplicator package of your WordPress site. This process may take a few minutes depending on the size of your website.
Once finished, you’ll see download options for Installer and the Archive package. You need to click on the ‘One click download’ link to download both files to your computer.
The archive you just download contains a copy of your website and the installer script will automate and run the migration by unpacking the archive file.
Step 2: Create a database for new domain name
Before you can move, you’ll need a database. If you have already created a database, then you can skip this step.
To create a database, you need to visit your hosting account’s cPanel dashboard, scroll down to the ‘Databases’ section, and then click on the ‘MySQL Databases’ icon.
On the next screen, you’ll see a field to create a new database. Simply provide a name for your database and click on the ‘Create Database’ button.
cPanel will now create a new database for you. After that, you need to scroll down to the MySQL Users section. Next, provide a username and password for your new user and click on the ‘Create a user’ button.
The new user you just created, still does not have permission to work on the database. Let’s work on that.
Scroll down to the ‘Add User to Database’ section. Simply select the database user you created from the dropdown menu next to the ‘User’ field, then select the database, and click on the add button.
Your database is now ready to be used on for moving WordPress to the new domain name. Make sure to note down the database name, username, and password. You’ll need this information in the next step.
Step 3: Upload your migration package to the new domain
Now you need to upload the Duplicator files you downloaded earlier to your new domain name directory.
Login to your hosting cpanel and navigate to the file manager and open your new domain’s directory. Also, make sure that the root directory of your website is completely empty. After that, you can upload the archive and installer files to the root directory. Once both files have finished uploading, you are now ready to unpack WordPress.
Open a new browser tab and go to the following URL:
Don’t forget to replace yournewdomain.com with your new domain name. This will launch the Duplicator migration wizard.
The installer will look for the archive file. You need to check the terms and conditions checkbox and click on the next button to continue.
Now, the installer will ask you to enter your WordPress database information.Your host will likely be localhost. After that, you will enter the details of the database you created for your new domain name in the earlier step.
Once done, click on the next button to continue.
Duplicator will now unpack your WordPress database backup from the archive into your new database.
Next, it will ask you to update site URL or Path. You shouldn’t have to change anything since it automatically detects the URL of your new domain name and its path.
If it doesn’t, then you can change the URL to your new domain name. After that, click on the next button to continue.
Duplicator will now finish the migration.
You can click on the ‘Admin Login’ button to enter the WordPress admin area of your website on the new domain name.
Step 4: Setup Permanent 301 redirects on your old domain
Setting up a permanent 301 redirect is very important for both SEO and user experience.
This step will allow you to automatically redirect users and search engines to your new domain name.
In other words, whenever someone lands on one of your old posts or pages, they will be automatically redirected to your site on the new domain.
To setup a permanent 301 redirect, you need to login to old domain’s cpanel and edit your .htaccess fine
Remove everything from there and paste the below code in your .htaccess file
Note: Replace yournewdomain.com with your new domain in the above code.
Once you have applied these changes, then visit your old domain name. It should automatically redirect you to the new domain.
Step 5: Update your domain name on Google Search Console
Now that you have moved WordPress to a new domain name and setup redirects, it is time to notify Google about the change of address. This will help Google find your new domain name quickly and start showing it in search results.
First, you need to add your new domain name to the Google Search Console.
After you have added your new site, you need to switch to the old version of Google Search Console.
Next, you need to switch to your old domain name and then click on the gear icon at the top to launch change of address tool.
On the next screen, Google Search Console will show you a step by step wizard to submit your change of address request.
First it will ask you to select your new site from the drop down menu. After that, click on the check button to test 301 redirects and then confirm verification.
Finally, click on the submit button to send your address change request.
So, there you have it. You have successfully migrated your WordPress site to a new domain address.