Do you wish to transfer a WordPress website from subdomain to root domain? The method is pretty straightforward to comply with, and there’s a approach to save your search engine optimisation rankings as properly. On this article, we’ll present you tips on how to simply transfer WordPress from subdomain to root domain with step-by-step directions.
Transferring WordPress from Subdomain to Root Domain
A subdomain is an extension of your root area title. For instance, http://yourwebsite.instance.com is a subdomain of instance.com. On this case, instance.com is the basis area.
Engines like google think about subdomain to be a completely completely different web site. For this reason that you must just be sure you correctly redirect search engines like google and yahoo to the basis area after the switch. This can make it easier to protect search rankings after transferring your web site.
In contrast to transferring a WordPress website to new host or a new area title, transferring a website to root area is a bit simpler.
Primarily as a result of each are normally hosted with the identical webhosting firm. This lets you skip a couple of steps.
Let’s check out tips on how to transfer a WordPress website from subdomain to root domain.
Step 1. Create a Full Backup of Your Web site
It’s best to at all times preserve a backup resolution put in in your web site for automated backups. There are many WordPress backup plugins that you should use to maintain your WordPress content material secure.
Now if you have already got a backup plugin put in, then it’s possible you’ll be considering which you could skip this step.
This step is to remind you that even if in case you have automated backups of your web site, you continue to must create a whole backup of your website. This features a database backup in addition to a backup of all of your WordPress recordsdata and folders.
After you have created a whole backup, just be sure you retailer it on a distant location or in your laptop.
Step 2. Shifting Your WordPress Recordsdata From Subdomain to Root Folder
First that you must hook up with your web site utilizing a FTP consumer or cPanel’s file supervisor. As soon as linked, go to your subfolder location and obtain all of your WordPress recordsdata to your laptop.
Subsequent, open the public_html folder of your root area. Relying on how your WordPress internet hosting atmosphere is setup, this folder may be named www or after your area title.
Now, that you must add all WordPress recordsdata you downloaded earlier to the basis listing.
Step 3. Change WordPress URL and Web site URL Settings
As soon as you progress the WordPress recordsdata, you won’t be able to entry the WordPress admin space on the basis area. Attempting to login to the basis web site will ship you again to the subdomain web site’s admin space.
To repair this, swap to the FTP consumer and go to the basis listing of your area title. Subsequent, that you must edit the wp-config.php file and add the next strains simply earlier than the road ‘That’s all, cease enhancing! Completely happy running a blog’.
Don’t overlook to exchange instance.com with your individual area title. If you need your root web site to make use of www then you have to to enter the URLs with www prefix.
Save your adjustments and add the wp-config.php file again to your web site.
Now you can go to your WordPress website’s admin space on the basis area title.
Step 4. Replace URLs
Your WordPress website has moved to the basis area, however there can be hyperlinks inside your WordPress database pointing to the subdomain.
Let’s repair that.
You will have to put in and activate the Velvet Blues Replace URLs plugin. For extra particulars, see our step-by-step information on tips on how to set up a WordPress plugin.
Upon activation, that you must go to Instruments » Replace URLs web page.
On this web page, that you must enter your subdomain url subsequent to the Previous URL possibility and add your root area as the brand new URL. Subsequent, below the ‘Select which URLs must be up to date’ space, that you must verify all choices besides ‘All GUIDs’.
As soon as you’re finished, click on on the ‘Replace URLs Now’ button to proceed.
The plugin will now replace all URLs in your WordPress database. This will take a while. As soon as completed, you will note successful message.
Step 5. Redirect All Subdomain Site visitors to The Root Area
Now that you’ve moved WordPress recordsdata, let’s make it possible for your subdomain site visitors is redirected to the basis area title.
Go to your subdomain folder and make it possible for hidden recordsdata are pressured to be seen.
You May Also Like : How to Fix Destination Folder Already Exists Error in WordPress
Your FTP consumer settings have an choice to at all times present hidden recordsdata. In FileZilla, it’s situated below ‘Server > Pressure Displaying Hidden Recordsdata’ possibility.
If you’re utilizing cPanel File Supervisor, then click on on the Settings button on the prime proper nook of the display screen. This can deliver up the preferences popup. You must choose ‘Present hidden recordsdata’ after which click on on the save button.
In case your subdomain folder already has a .htaccess file, then you’ll be able to delete it and create a brand new one. Inside the brand new .htaccess file, that you must copy and paste the next code:
Don’t overlook to exchange yoursubdomain along with your precise subdomain, and instance.com along with your area title.
Please be aware that the RewriteRule line makes use of a non-www URL. If you wish to use www in your root area, then you have to so as to add your URL with a www prefix.
Save your adjustments and add your .htaccess file to the server.
That’s all, you might have efficiently moved your website from subdomain to root domain. Now you can go to your web site to see it in motion. Take a look at out your web site to make it possible for every thing is working effective.
We hope this text helped you progress your website from subdomain to root domain. You might also wish to see our final WordPress search engine optimisation information for rookies.
If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.