Many people like to create and test a new version of their site in a subfolder so that it doesn’t affect their main domain. Once completed, they will want to migrate the new site over to the root directory for the domain. This is very common with WordPress. Follow the instructions below as we guide you on how to move WordPress from a Subfolder to the Root Directory.
Make a Backup of your account
Before performing the following procedure, it is a good idea to make a backup of your account before making any changes.
Prepare your WordPress installation for the move
Before physically moving the files, you’ll need to prepare the installation to accept the new URL name.
1. Log into your WordPress Dashboard. For instance.
2. From the main dashboard, go to Administration -> Settings -> General.
3. Next, search for the WordPress address (URI): and change it from (example.com/WordPress to example.com)
4. Lastly, search for the Site Address (URL): and change it from (example.com/WordPress to example.com)
Moving your WordPress from a subfolder to your main folder
After you have made your backup, removed the site files from the builder, and prepared your WordPress files, it’s time to move your WordPress to the primary folder.
1. Log into your cPanel admin dashboard.
2. From the main cPanel area, search 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’ll want to navigate to the folder you have the WordPress site in. For instance, 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’ll enter the destination folder. Continuing with our WordPress folder example, it should show as public_html/WordPress. Remove the /WordPress from the destination path so that it simply displays as public_html. Click the Copy Files button.
6. This will copy the files up to the public_html 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’ve in your WordPress folder.
8. You can now delete the old WordPress folder.
Log in and finish the URL details
1. Log into your NEW WordPress admin dashboard. For instance (example.com/wp-admin or example.com/wp-login.php)
2. Go to Administration -> Settings -> Permalinks and make sure the link structure is the same as your new URL.
Are you curious about unleashing the power of WordPress? Our managed platform for WordPress is fine-tuned to deliver superior performance, security, and provide best-in-class hosting. Be sure to check out our WordPress-optimized hosting plans.