How to Move WordPress from a Subfolder to the Root Directory

How to Move WordPress from a Subfolder to the Root Directory

Many develop and test new website versions in subfolders to avoid interfering with their primary domain. Once they are done, they’ll be looking to transfer the site into the leading directory of the field. This is commonplace with WordPress. Follow the steps below as we guide how you can move WordPress out of a subfolder onto the Root Directory.

Make a backup of your account.

Before you begin the process, Creating an account backup before making any modifications is an excellent idea. Learn how to create backups by clicking here. Make backups of your website’s files within the cPanel.

Make sure you have your WordPress installation to be ready for the change.

Before physically moving the files, you must configure the installation for the new URL.

  1. Log in to Your WordPress Dashboard, for instance.
  2. On the dashboard that you are on, click Administration > Settings General.
  3. Next, look for the WordPress address (URI): and change it from ( to
  4. Lastly, look for the Site Address address (URL): and change it from ( to

Then, move the contents of your WordPress to a new folder in the main folder.

Once you’ve created backups, deleted the website content from the builder, and made the WordPress files, it’s time to transfer your WordPress into the main folder.

  1. Log into your cPanel admin dashboard.
  2. Search within the files category in the cPanel’s central area, then select the File Manager tool. Navigate to Settings. In the preferences window, click the checkbox titled to show hidden files.
  3. When you’re in the File Manager, You must go to the folder where your WordPress site is placed. For instance, a folder called WordPress.
  4. A list of all WordPress folders and files is on the right-hand panel. Mark them all and click the Copy icon in the menu toolbar at the upper right of the page.
  5. A pop-up window will open to go to the folder you want. Continuing our WordPress folder example, it should show as public_html/WordPress. Eliminate the “/WordPress” in the path to the destination so that it shows in publicly-html. Select the copy files button.
  6. The files will be copied onto the publicly-accessible folder. Make use of File Manager to return to public_html. The public_html folder. (You can accomplish this by clicking the Up One Level button in the toolbar at the top of the right-hand panel.)
  7. Now, you should see identical files to those you do within the WordPress file.
  8. You are now able to erase your previous WordPress directory.

Log in, and then complete the URL information.

  1. Log in to Your NEW WordPress administrator dashboard. For example ( or
  2. Click on Administration> Settings Permalinks and ensure your link structure is identical to the new URL.

Are you keen to unlock the potential of WordPress? The managed WordPress platform we offer WordPress has been tuned to provide high performance as well as security. We also offer the best hosting available. Check out the WordPress hosting packages.


  1. Edit your wp-config.php file.
  2. In the upper right corner of the file, you should add define(‘RELOCATE,’ true); line: Copy.
  3. define(‘RELOCATE’,true);
  4. Go to your webpage in your browser.
  5. Be sure to enter the path to your WordPress primary files before wp-login.php
  6. Log in to your WordPress dashboard the same way you usually do.
  7. If you go to Settings > General and then General, you will notice that WordPress has already filled in the WordPress address (URL) field for you, including the URL to your WordPress files.


Leave a Reply