Worried about how to move WordPress to a new domain? Then, here is a solution for you.
Your website SEO and ranking are related to your website domain name. If you follow the wrong process then, there is a higher chance to damage your website’s search result. This will put all your effort in vain.
That’s why in this blog, I will show you a proper way to migrate your WordPress site to a new domain without harming your SEO.
Will changing domain name can bring any good?
Does domain name affect SEO? This is the question of lots of WordPress users. The answer is it does. Because domain name, SEO, ranking all are inter-connected. In fact, changing domain too often can vanish your brand popularity. But, it is not like you can never change your domain name. You can when you actually need to change it.
Here I’m listing down the situations where changing domain can be a good idea:
- When you will find a better and powerful domain name for your business. For example domain.net to domain.com.
- If changing the domain name is necessary for branding.
- Domain name turns out too expensive for your business.
- Moving a WordPress site to a new domain that is built on localhost.
There might be other situations where changing the domain name becomes necessary. In these cases, you can change the domain name and transfer WordPress website to a new domain. But don’t change it too often as it is a bad practice. In the next part, I will guide you on how to change your domain without losing SEO.
Things you need to do before moving WordPress to a new domain
Before transferring your WordPress site to a new domain, you need to make sure of some things. This will help you to transfer your WordPress site safely without having any issues. Even if you somehow get yourself into trouble, then you can eventually overcome that problem by keeping backup.
Here are the things you need to do before changing your domain name:
- Having access to Cpanel: You will need Cpanel access for moving your WordPress site to a new domain. Because localhost doesn’t have a Cpanel.
- Select your new domain (brandable domain): Make your mind what domain name you want to choose for your WordPress site. Choose a domain name that is more brandable than your previous domain name.
- Prepare backup for your WordPress site before migrating it to a new domain: Here the most important precaution comes. Preparing your site’s backup for preventing any sudden disaster. There are lots of WordPress plugins that will help you to backup your WordPress site, for example Updraftplus, BackupBuddy, Jetpack, and so on. Use one of these plugins for backing up your WordPress site.
Step-by-step guide to move your WordPress to a new domain
Here I will show you a step-by-step guide to migrate your WordPress site to a new domain without a plugin. This is the easiest way that will let you change your domain address within a few minutes. Just follow the following seven steps to copy and transfer your WordPress site to a new domain without harming your SEO:
Step #1: Add your selected domain to your hosting.
In the first step, you need to add your selected domain name to your hosting through Cpanel for moving WordPress site to a new domain. You can easily do it by going to your Cpanel then clicking addon domains.
Now it’s time to enter your new domain name, subdomain, document root for adding a new domain to hosting. After adding these info, click on the add domain button to copy and migrate WordPress site to a new domain.
Step #2: Copy your previous domain folder and paste it to new.
In this step, you need to copy your previous domain folder to the new domain folder if you’re not transferring WordPress to a new host. If you want to transfer WordPress to a new host as well then, you need to download the backup. Finally, add it to your FTP. Use Cpanel to do all these.
Step #3: Alter the site URL for your new domain in wp-config.php.
You need to open your new domain folder and edit the wp-config.php file for defining the site URL and home page for your new domain. To define your site URL and home page, you can use the following code:
define('WP_SITEURL', 'http://newdomain.com'); define('WP_HOME', 'http://newdomain.com');
Step #4: Update database info if you are changing hosting as well.
You need to update your database if you are changing hosting as well otherwise, no need to change it. To update it, go to your wp-config file of WordPress installation.
Just login to your Cpanel and press the file manager to transfer WordPress site to a new domain.
After that, go to your WordPress installation folder and right-click on the wp-config.php file, and click on the edit option. Now find the database name and replace your old name with the new one for moving WordPress site to a new domain.
Step #5: Install search and replace plugin to move WordPress site to a new domain.
In the fifth step, simply go to the admin dashboard of your new domain and install the search and replace plugin. This plugin will help you to replace the new domain with the old one.
Step #6: Clean your cache.
Keep yourself safe by clearing your cache. After cleaning, just refresh your browser and visit your new domain homepage for performing the final step of transferring WordPress website to a new domain.
Step #7: Redirect your domain.
Now you need to perform the final step that is redirecting your old domain name to your new domain name permanently. That means performing permanent redirection that is 301 redirect. This will help you to move the WP site to the new domain without harming SEO.
To do it, login to your Cpanel and click on the file manager to open your website folder. Open your file folder and right-click the .htaccess file to select edit.
After that, add the below codes at the top of your file.
#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.newsite.COM/$1 [R=301,L]
Don’t forget to add a new domain name instead of newsite.com.
More WordPress guide blogs:
How to increase WordPress memory limit?
How Can You Maintain Your Website Security Flaws?
How to Add Custom User Roles in Your WordPress Website Without Coding
How to Add a Search Bar to a WordPress Site?
Wrapping up with a new domain address:
Have you understood the whole process? The above seven steps will guide you to move your WordPress site to a new domain. There are other options as well like you can change your domain address by using a plugin. But, to do that, you need to go through lots of steps that can make you confused.
This process of moving WordPress site to a new domain might seem hard if you are not a developer. But, if you just follow the steps then you will understand, it is not that hard it seems to you. So, give it a try and migrate your WordPress site to a new domain. Let us know if you’re following this or any other process.