How to Move My WordPress to a New Domain in 9 Simple Steps Without Losing SEO

How to Move My WordPress to a New Domain in 9 Simple Steps Without Losing SEO

Moving a WordPress site to a new domain name is possible, but it carries some risks. You can potentially lose your content, traffic, and search engine rankings if the process is done incorrectly.

When switching domain names, you can transfer to a new web host or stay with the same WordPress web hosting provider. This article will show you how to use the first method, which involves moving the entire WordPress website to a new server.

After securing a new hosting plan and a web domain, follow these nine steps to change your WordPress website’s domain without losing SEO rankings.

Pro Tip

Some hosting providers like Hostinger include free domain name in their hosting packages. Use this deal to get the best value for money and streamline the website migration process.

Moreover, consider the option to unpublish your WordPress site, so your visitors won’t encounter errors during the process.

1. Download a Website Backup

Backing up your website files helps to prevent data loss, as you can import them back if the transfer process fails. It’s also a great practice to do in general before applying any major changes to your website.

There are three ways to back up a WordPress website ‒ manually with a File Manager or a File Transfer Protocol (FTP) client, using your web hosting’s backup feature, or using a backup plugin. Use either method to download your site’s files locally.

Hostinger users can access the built-in backup feature within the Files section of the hPanel dashboard.

The Backups button in hPanel

2. Export Database

After downloading your WordPress site files, export your MySQL database using phpMyAdmin. This administration tool is accessible inside the Databases section in hPanel. If you’re not a Hostinger user, check your hosting provider’s dashboard for this tool.

The phpMyAdmin button in Databases section in hPanel

phpMyAdmin lets you export the database in various formats. However, we recommend using the default SQL format as your new web host most likely uses phpMyAdmin too.

3. Upload Files to the New Domain

Navigate to the admin dashboard of your new hosting provider and upload the website files to the server. Like in the first step, you can transfer WordPress files to the new root directory using either a File Manager or an FTP client.

If you’re moving to Hostinger, the File Manager is accessible under the Files section of your hPanel.

The File Manager button on hPanel

Pro Tip

If you wish to switch to Hostinger but don’t have time to do it manually, we have a migration team that can assist you with that, you only need to send us a request to move website.

4. Import Database

First, create a new MySQL database to host the data from the old domain. Hostinger users can go to Databases -> MySQL Databases to the hPanel dashboard to do this step.

In the Create a New MySQL Database And Database User section, enter the required WordPress database information like the database name, username, and password. Once done, select Create.

The new database will appear in the List of Current MySQL Databases And Users section.

The MySQL databases management page on hPanel

Now that you have a new database to work with, import your exported database using phpMyAdmin. Upload the exported database file and leave all the settings to their default value. Make sure to set the format to SQL.

The Database Import feature in phpMyAdmin

Pro Tip

If your new hosting provider takes care of the entire WordPress installation process, your new site will most likely come with a database. In that case, proceed to import the database from the previous domain with phpMyAdmin.

5. Update the URL in the Database

After importing the database, the next step is to point it towards the new domain name. To accomplish this, change the website’s URL in the new database.

Open your new database in phpMyAdmin and click on the wp-options table on the left sidebar. Edit the siteurl and home options and replace the old URL with the new one.

Locating the siteurl and home options of a WordPress database in phpMyAdmin

6. Update Details in wp-config.php

As the wp-config.php file is responsible for setting up WordPress database connections, you must update it to reflect the domain name change.

Locate the PHP file in your root directory and then open it using your web host’s File Manager. Replace the values of the following functions with the new ones.

define('DB_NAME', 'new database name);
define('DB_USER', 'new database username');
define('DB_PASSWORD', 'new database password');
define('DB_HOST', 'new host name');
The database details inside wp-config.php file

Add the following code snippet above the “MySQL settings – You can get this info from your web host” text to redefine the location of your core WordPress files. Make sure to replace the placeholder URL with the correct domain name.

define('WP_HOME', 'http://newdomain.com');
define('WP_SITEURL', 'http://newdomain.com');

Pro Tip

If you prefer to use a text editor over a File Manager, download the wp-config.php file via an FTP client and re-upload it to the root folder once you update it.

Broken links are among the most common issues when moving WordPress site to a new domain. WordPress users are being redirected to 404 error pages when clicking on the links on your website, increasing the bounce rate and hurting your SEO efforts.

For these reasons, fixing any broken links on your new WordPress site is essential before it goes live.

Locate broken links on your new WordPress site using an SEO audit tool like Semrush and Google Search Console. Many WordPress plugins like Broken Link Checker and Link Checker Professional can help you fix faulty links without manually updating each page.

Pro Tip

If WordPress link checker plugins can’t solve your broken link issue, consider resetting the WordPress permalinks settings or .htaccess file.

8. Set up 301 Redirects From the Old Site

Now that your WordPress website has fully migrated to the new domain, the next step is to set up 301 redirects. Whenever users access a URL that belongs to your old domain, they’ll be redirected to the same web page on the new domain instead of a 404 error page.

Like the previous step, setting up 301 redirects from the old domain helps to maintain your SEO efforts and excellent user experience. It’s also a great way to preserve your old domain’s authority and speed up the new domain’s traffic growth.

Hostinger users can redirect their URL using the Redirects feature in hPanel. Alternatively, create 301 redirects using WordPress SEO plugins like Yoast SEO and All in One SEO.

9. Update Your Google Search Console

The next step for transferring a WordPress site to a new domain is notifying Google about your domain name change. The easier search engine crawlers can find your new domain name, the sooner your WordPress site can rank in search results.

Navigate to Settings from your Google Search Console dashboard and use the Change of Address tool to submit your request for the domain change. Keep in mind that the verification process can take up to 180 days to complete.

The Change of Address tool in Google Search Console

Conclusion

Moving WordPress site to a new domain can benefit its growth only if it’s done right. Otherwise, you’ll end up with many technical issues that are time-consuming to fix and harmful to your SEO efforts.

We have gone through the nine steps to move an entire website to a new domain. Each step comes with helpful tips to ensure your SEO remains unaffected by the migration process.

Should you have any more questions, leave us a comment below.

How to Move My WordPress to a New Domain FAQs

Here are some frequently asked questions about how to move your WordPress site to a new domain.

How Does Changing My Domain Affect SEO?

Changing your domain can cause a temporary drop in rankings and traffic, affect backlinks and domain authority, and require updating URLs across the site. Therefore, proper planning and implementation of redirects can help minimize negative effects.

Can I Move My WordPress Site to a New Domain for Free?

Yes, you can move your WordPress site to a new domain for free. However, you may need to pay for domain registration and hosting fees for the new domain. There are free plugins available to assist with the migration process.

Author
The author

Jordana A.

Jordana is a Senior Content Writer with over 5 years of experience in digital marketing and web development. When she’s not busy with work, she dabbles in creative writing and movie reviewing. Follow her on LinkedIn.