Do you want to move your WordPress site to a new domain? Changing your website’s domain name can significantly impact your SEO rankings, and it’s a process that needs to be done very carefully.
While you cannot avoid temporary SEO fluctuations when moving your website to a new domain, you can definitely minimize the impact and quickly regain your search traffic and rankings.
In this guide, we will show you the proper way to move WordPress to a new domain without losing SEO.
Here’s the 5 step process that we will cover to help you migrate your WordPress site to a new domain name:
- Create a Duplicator package of your WordPress site
- Create a database for new domain name
- Unpack WordPress on new domain
- Setup Permanent 301 redirects
- Notify Google about the change
Before You Start
Before you start, we want to emphasize a few things.
The process of switching to a new domain will temporarily affect your search engine rankings as Google and other search engines adjust to the changes.
Yes, this will also temporarily affect your search traffic as well. Please keep in mind that this is normal, and it happens to all websites that switch to a new domain.
However, you can dramatically decrease the SEO impact by following this guide. We will show you the right way of moving your WordPress site to a new domain name, setting up proper 301 redirects, and notifying search engines.
Please note that this guide is not for moving WordPress site to a new web host. This is for switching a domain name. Yes, while the process is similar, there are extra things involved in this process.
In this guide, we are assuming that you have your WordPress site setup on oldsite.com, and you are trying to migrate it to newsite.com.
We are 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 FTP.
Once you have your new web hosting account and domain name, you’re ready to start the process.
Step 1: Create a Duplicator package of Your WordPress Site
The first thing you need to do is create a full backup of your WordPress site. While there are many WordPress backup plugins available, the one we’re going to show in this step does both backups and migrations.
It’s Duplicator and it’s a completely free plugin.
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 file is a complete copy of your website, and this will allow you to move WordPress to another domain name. 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 to unpack WordPress on your new domain name.
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 change 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. Unpacking WordPress on New Domain Name
Now you need to upload the Duplicator files you downloaded earlier to your new domain name.
First, connect to your domain name using an FTP client. Once connected, 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 example.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. Setting up Permanent 301 Redirects
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 connect to your old site using FTP and edit the .htaccess file.
This will be located in the same directory as your wp-includes or wp-admin folder. Open the .htaccess file and paste the following code at the very top:
#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]
Note: Replace newsite.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.
If it doesn’t, then it means the redirection is not setup properly, and your server likely doesn’t support redirect rules. You need to reach your web hosting’s support to get RewriteEngine turned on.
Step 5. Notifying Google About the Change
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. See step 1 in our Google Search Console guide for instructions.
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.
Notify Users About the Move to New Domain Name
While the 301 redirects do their job, it is always good to make a public announcement about the migration.
You can do this by simply writing a blog post on your new site and sharing it on your social media accounts.
If you have an email marketing list, then you should send a newsletter to let all your subscribers know.
This can be helpful in a lot of ways.
First and foremost, your users are more likely to remember the new domain once they read about it.
Second, you can ask your users to let you know if they see any bugs. You alone cannot test your site in all different type of browsers and system environments. It’s always helpful to have a fresh pair of eyes looking at it.
We hope that this tutorial helped you move your WordPress site to a new domain name. You may also want to see our guide on how to track your search keyword rankingsafter moving to new domain name.
The post How to Easily Move WordPress to a New Domain (without Losing SEO) appeared first on WPBeginner.