How to Move WordPress from a Subfolder to the Root Directory

How to Move WordPress from a Subfolder to the Root Directory

DWQA QuestionsCategory: WordPressHow to Move WordPress from a Subfolder to the Root Directory
Team Glosting Staff asked 9 months ago

Make a Backup of your account

Before performing the following procedure, it is a good idea to make a backup of your account prior to making any changes.

Prepare your WordPress installation for the move

Prior to physically moving the files, you will need to prepare the installation to accept the new URL name.

1. Log into your WordPress Dashboard. For example. http://yourdomain.com/wp-admin

2. From the main dashboard, go to Administration -> Settings -> General.

3. Next, look for the WordPress address (URI): and change it from (yourdomain.com to yourdomain.com/WordPress)

4. Lastly, look for the Site Address address (URL): and change it from (yourdomain.com to yourdomain.com/WordPress)

Moving your WordPress from a main folder to your subfolder

After you have made your backup, removed the site files from the builder, and prepared your WordPress files, it is time to move your WordPress to the primary folder.

1. Log into your cPanel admin dashboard.

2. From the main cPanel area, look for the Files category and then click on the File Manager tool. Go to Settings In the Preferences window that appears, select the checkbox entitled Show Hidden Files.

3. Once inside the File Manager, you will want to navigate to the folder you have the WordPress site in. For example, a folder named WordPress.

4. You will see a list of all the WordPress files and folders in the right hand panel. Highlight them all and click on the Copy icon from the menu toolbar across the top of the page.

5. A popup will appear so you can enter the destination folder. Continuing with our WordPress folder example, it should show as public_html. Add the /WordPress in the destination path so that it displays as public_html/WordPress. Click the Copy Files button.

6. This will copy the files up to the public_html/WordPress folder. Use the File Manager to navigate back to the public_html folder. (You can do this by clicking on the Up One Level button from the toolbar across the top of the right hand panel.)

7. You should now see the same files as you have in your WordPress folder.

Log in and finish the URL details

  1. Log into your NEW WordPress admin dashboard. For example (yourdomain.com/WordPress/wp-admin or yourdomain.com/WordPress/wp-login.php)

2. Go to Administration -> Settings -> Permalinks and ensure the link structure is the same as your new URL.