How to Move WordPress from a Subfolder to the Root Directory Updated on July 7, 2023 by Scott Mitchell 2 Minutes, 36 Seconds to Read Many people like to create and test a new version of their site in a subfolder so that it does not 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. Table of Contents Make a Backup of your account Prepare your WordPress installation for the move Moving your WordPress from a subfolder to your main folder Log in and finish the URL details 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. Learn how to make a backup here: Backup website files in cPanel. 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. Log into your WordPress Dashboard. For example. From the main dashboard, go to Administration -> Settings -> General. Next, look for the WordPress address (URI): and change it from (example.com/WordPress to example.com) Lastly, look for the Site Address 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 is time to move your WordPress to the primary folder. Log into your cPanel admin dashboard. 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. 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. 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. A popup will appear so you can 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. 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.) You should now see the same files as you have in your WordPress folder. You can now delete the old WordPress folder. Log in and finish the URL details Log into your NEW WordPress admin dashboard. For example (example.com/wp-admin or example.com/wp-login.php) Go to Administration -> Settings -> Permalinks and ensure the link structure is the same as your new URL. Are you interested in 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 hosting plans. Share this Article Related Articles How to Create and Edit Pages and Posts in WordPress What is the Difference Between Pages and Posts in WordPress How to Add Videos to WordPress How to Create and Add a Logo To WordPress How to Use a Custom Paypal Button in Your Website How to Track WordPress Vulnerabilities With WPScan How to Redirect WordPress Posts After Changing Permalinks W3 Total Cache – Guide to WordPress Caching How to Globally Change the Font in WordPress Create a Footer for WordPress
I’m a student and gamer so recently I installeded wordpress at Takenbest Site but after sometimes, I need it to migrate to a sub domain but it showed database error, what should I do. I can share its picture with error details but here no option to share photos.
Since it seems your database is not connected, I recommend following our guide on Configuring WordPress After a Migration. If your problems persist, our Live Support team is available to help.