Are you thinking of moving a WordPress site sub-domain to a root domain? The process is fairly easy to follow, and there is a way to save your SEO rankings as well. In this article, we will show you how to easily move WordPress from subdomain to root domain with step by step instructions.
Transferring WordPress from A Sub-Domain To A Root Domain
A subdomain is an extension of your root domain name. For example, http://yourwebsite.example.com is a subdomain of example.com. In this case, example.com is the root domain.
Search engines consider sub-domains to be a totally different website. This is why you need to make sure that you properly redirect search engines to the root domain after the transfer. This will help you preserve search rankings after moving your website.
Unlikemoving a WordPress site to a new host or anew domain name, moving a site to root domain is a bit easier. This is because the two are usually hosted by the same hosting company.
Step 1: Create A Backup Of Your Site
You should always keep a backup solution installed on your website for automated backups. There are plenty of WordPress backup plugins that you can use to keep your WordPress content safe.
Once you have created a complete backup, make sure that you store it in a remote location or on your computer.
Step 2: Move Your WordPress Files From The Sub-Domain To The Root Folder
First, you need to connect to your website using anFTP client or cPanel’s file manager. Once connected, go to your subfolder location and download all your WordPress files to your computer.
Next, open the public_html folder of your root domain. Depending on how yourWordPress hosting environmentis set up, this folder could also be named www or after your domain name.
Now, you need to upload all WordPress files you downloaded earlier to the root directory.
Step 3: Change Your WordPress URL And Site URL Settings
Once you move the WordPress files, you will not be able to access the WordPress admin area on the root domain. Trying to login to the root website will send you back to the subdomainwebsite’s admin area.
To fix this, switch to the FTP client and go to the root directory of your domain name. Next, you need to edit the wp-config.php file and add the following lines just before the line ‘That’s all, stop editing! Happy blogging’.
Don’t forget to replace example.com with your own domain name. If you want your root website to use www then you will need to enter the URLs with www prefix.
Save your changes and upload the wp-config.php file back to your website.
You can now visit your WordPress site’s admin area on the root domain name.
Step 4: Update Your URLs
Your WordPress site has moved to the root domain, but there will be links inside your WordPress database pointing to the subdomain. Let’s fix that.
You will need to install and activate theVelvet Blues Update URLsplugin. Upon activation, you need to visitTools » Update URLs page.
On this page, you need to enter your subdomainURL next to the Old URL option and add your root domain to the new URL. Next, under the ‘Choose which URLs should be updated’ area, you need to check all options except ‘All GUIDs’.
Once you are done, click on the ‘Update URLs Now’ button to continue.
The plugin will now update all URLs in your WordPress database. This may take some time. Once finished, you will see a success message.
Step 5: Redirect All Your Sub-Domain Traffic To The Root Domain
Now that you have moved WordPress files, let’s make sure that your subdomain traffic is redirected to the root domain name.
Go to your subdomain folder and make sure that hidden files are forced to be visible. Your FTP client settings have an option to always show hidden files. If you are using cPanel File Manager, then click on the Settings button at the top right corner of the screen. This will bring up the preferences popup. You need to select ‘Show hidden files’ and then click on the save button.
If your subdomain folder already has a.htaccess file, then you can delete it and create a new one. Inside the new .htaccess file, you need to copy and paste the following code:
You can create an email email filters through your cPanel control panel which is where you manage your hosting account. Email filters can be set up to target specific word, subject, from or to. Emails that are filtered out can be sent to a different email, deleted, delivered to a...
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...