Move WordPress From Subdomain to Root Domain

In this article, we are going to share how you can Properly Move WordPress From Subdomain to Root Domain. We will show you how you can easily move WordPress subdomain to root domain without losing SEO and ranked keywords. In the following article, you will get step by step instructions to properly move WordPress from subdomain to root domain.

Convert WordPress from subdomain to root domain

Subdomains are the extension of main or root domains. Such as you have observed that many websites have Forum and they use forum.domain.com as the subdomain for a forum.

Subdomains are the different entity for search engines even that search engine consider them a whole website. Subdomains have their own sitemaps to manage their pages for search engines. You must have to redirect your subdomains to your if you want to move WordPress from subdomain to root domain.

This technique will help you to maintain your Search Engine Optimization for your domain. Because when you remove subdomain to root domain the link which is index within search engines remain there and the only way to Grab the traffic is to redirect them to root domain.

Let’s move on to the steps which will help you to properly move WordPress from subdomain to root domain.

1 Create backup

Whenever you are playing with server and website settings you must have to create a backup of your website. So that it will help you whenever something gets wrong during the process. There are many WordPress backup plugins which you can use to make an instant backup for your WordPress site and protect your content.

It is highly recommended to create a complete backup of your site before processing further. In additional must create database backup to along with the WordPress file and folder backup.

2 Move WordPress from subdomain to root domain

First of all, you have to make the connection between FTP client and your cPanel. So that you can easily access the file manager by which you can easily move WordPress from subdomain to root domain folder. Once you have created the connection you can access subdomain folder and download all the files which are included in your subdomain.

Properly Move WordPress From Subdomain to Root Domain

After this, you have to access the public_html folder which is usually the name of the root domain. It may vary according to the WordPress hosting environment, in some cases, the name of the website is the root folder name.

Now you just have to upload all the WordPress file which you have earlier from your subdomain to your root folder.

Properly Move WordPress From Subdomain to Root Domain

3 Define WordPress URL and site URL

Once you have properly move WordPress from subdomain to root to main you are not allowed to access admin area from the root domain. Whenever you will try to access root domain admin panel you will get automatically redirect to subdomain admin area.

To resolve this issue you have to access root directory of your domain. Then you have to configure wp-config.php and define the home page and site URL of your root domain. The following code will resolve your issue if you will add them to your wp-config.php file.

Remember don’t forget to replace root domain with the name of your website. Now you can save the changes and get back to the admin area of your root domain which is now accessible for you.

4 Update site URL

When you successfully move WordPress from subdomain to root domain your all site links were still redirecting to the subdomain links. This problem arises because you don’t update your database.

To resolve this issue, you have to install Velvet Blues Update URLs plugin. Which will help you to update site URLs.

Velvet Blues Update URLs

After activating the above plugin you have to visit Tools > Update URLs to proceed further.

Properly Move WordPress From Subdomain to Root Domain

On this page, you have to insert the proper address of your subdomain in the old URL text box and your main domain address in the new URL text box. Then you have to select the options about which URLs you want to update. You must have to select all the option except “ALL GUIDs”.

After that, you can update URLs. This process may take some time to update all URLs in your WordPress database. Once it’s done you will get a message of success or failure.

5 Redirect subdomain traffic

You have successfully move WordPress from subdomain to root domain now it’s time to redirect all the traffic sources of the subdomain to root domain.

You have to access your subdomain folder and make sure that hidden files are visible.

You can show hidden file from FTP client. From FileZilla under server drop-down, you can select force showing hidden files to access them.

Properly Move WordPress From Subdomain to Root Domain

If you are accessing your subdomain from cPanel File Manager then you have to click on setting button which is mostly on the top right corner of the screen. This will prob the popup of preference from where you can show hidden files and access them.

Properly Move WordPress From Subdomain to Root Domain

If .htaccess file is present in your subdomain folder, then you have to delete that and create a new .htaccess file. You just need to copy and paste the following code into your newly created .htaccess file.

Don’t forget to replace yoursubdomain with the actual name of your subdomain and example.com with your root domain name.

After this, you can save the changes in a .htaccess file.

It’s all done now. We have properly move WordPress from subdomain to root domain without losing any traffic and search engine ranking. Now access your root domain and test out that everything is working fine.

If you still facing any kind of problem regarding moving WordPress website then you can contact us. Don’t forget to share it with your friends if it is helpful for you. Must subscribe a YouTube channel for a tutorial in Hindi and Urdu.

SHARE