How To Move WordPress From Subfolder To Root Directory?

Do you run multiple sites on your web hosting server? Do you have an addon domain or the parked domain? Some people try their website by placing the WordPress in any folder other than the root directory. But after checking, they prefer to move WordPress from subfolder to root directory.

Do you want to know how to move WordPress site from subdomain to root directory? I am going to guide you for this. It’s the matter of choice that some people want to move their subdomain in the root directory whereas others move the WordPress to any other folder from the root directory.

Move WordPress Site From Subdomain To Root.

Do you have the forum for your website or any other subdomain? The bloggers create the subdomains to create a new and separate phase for their audience. You may have noticed that the blog with the URL “forum.domainname.com” for the people to put their problems where others can share their opinions.

I am going to walk you through the moving of WordPress from subfolder to the root directory. There are some steps to follow. Before walking ahead, you have to backup your website and the database.

How To Move WordPress Site To Root Directory?

Step 1:- Login to your cPanel and the find the “files” section.

Step 2:- From all the options, click on the “file manager“. Make sure that you have checked to show the hidden files of the root directory.

Step 3:- After that, you have to find the location of the WordPress for your addon domain or the subdomain. It may be the folder with the name of your subdomain or an addon domain or just the WordPress. Just open that folder.

It’s because all of the files and folders are located in this folder and you have to move WordPres from subfolder to root.

Step 4:- Select all the files present in this folder and click on the “copy” option from the above menu. You can do that with the right-click. Do it as your convenience.

Step 5:- Now you have to set the location for all the files. As you want to move WordPress site from subdomain to root directory so just keep the location as “public_html“.Wait till all the files and folders get copied in the main directory.

Wait till all the files and folders get copied in the main directory. The copying time is dependent upon the size of files and folders.

Step 6:- After moving the WordPress to the root directory, you can delete the old folder. Now is the time to set the site URL. You can do that from the database or from the WordPress dashboard.

Step 7:- Just go to settings>>general and you will find the WordPress URL and the Site URL. Change them from “yourdomain/foldername.com/ to “yourdomain.com”. The folder name is the name where the data was stored.

Step 8:- Now is the time to set the SEO friendly permalinks. Just go to settings>>permainks and choose the best permalink structure for your website.

You have successfully moved WordPress from the subfolder to the root directory. You can check it by adding the URL as your main domain name that your website is running perfectly.

Have You Tried To Move WordPress from Subfolder to Root?

As I have mentioned about that it’s the matter of choice to move WordPress and sometimes it’s the need. Developers try to check their website by adding in the separate folder so that it won’t affect the root directory and the data stored in it.

After the testing phase, they move WordPress from subfolder to root directory. Have you come to know how to move WordPress site to root directory? The simple steps are shown above, just follow them. If you face any problem then I am here to help you.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.

Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE

2 comments

  1. You have a very nice WordPress knowledge for sure. it’s a very point to point article about moving to root directory. Nice Ravi!

    Keep up the awesome work!!

    1. Hey Priyam,

      Thanks for the appreciation.
      WordPress is something interesting to dwell in. If you are running your website on the WordPress platform then these type tasks should be learnt.
      You should know the shifting of the WordPress. How to move the files and folders?
      Enjoy the stay.
      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *