Move WordPress from Subfolder to Root Directory is a common task when reorganizing your website structure for better accessibility and SEO. This process involves updating your WordPress URLs, moving files in your hosting account, and ensuring that everything remains functional without disrupting the site. By carefully following the correct steps such as backing up your website, moving files via cPanel or FTP, and fixing internal links in the database you can successfully shift your site without losing content or breaking links. This guide will walk you through the essential steps to move WordPress from a subfolder to the root directory smoothly.
Step-by-Step Guide:
Backup Your Website:
Before making any changes, it’s crucial to back up both your website files and your WordPress database. You can use plugins like UpdraftPlus or manually back up via FTP and phpMyAdmin.
Access Your WordPress Dashboard:
Log in to your WordPress admin panel which you need to Move WordPress from Subfolder to Root Directory.

Update WordPress Address and Site Address:
Go to Settings > General in your WordPress dashboard.

Update both the WordPress Address (URL) and Site Address (URL) fields to reflect the new root directory location. This typically means removing the subfolder from the URLs. For example, change http://example.com/subfolder to http://example.com.

Move WordPress from Subfolder to Root Directory
- Log in to your cPanel.
- Navigate to File Manager (usually located under the Files section).

- Enable Show Hidden Files in the settings.

- Open the subfolder where your WordPress is currently installed (e.g.,
/public_html/subfolder/).

- Click the Select all files option

- In the pop-up, change the destination to the root directory (usually
/public_html/) and click copy Files to Move WordPress from Subfolder to Root Directory

- Note: Ensure that files like
wp-config.phpand the.htaccessfile are also moved to the root folder.
You can also use FTP client to Move WordPress from Subfolder to Root Directory
Use FTP to access your server.
Move all files from the subfolder (/subfolder/) to the root directory (/public_html/).
Update Permalinks (Optional but Recommended):
To ensure all internal links work correctly, go to Settings > Permalinks and click Save Changes without making any modifications. This refreshes the permalinks structure.

Check and Update Your .htaccess File (Optional):
If you have custom rules in your .htaccess file (located in your WordPress root directory), ensure they are still relevant for the new setup. Sometimes, WordPress automatically updates this file, but it’s good to double-check.
Test Your Website:
Once Move WordPress from Subfolder to Root Directory, Visit your website to ensure everything is working correctly. Check various pages, posts, and functionality to confirm there are no broken links or issues.
Update Google and Other Search Engines (if necessary):
If your site has been indexed by search engines, you may need to update your sitemap and notify Google Search Console (or other search engine tools) of the change in URL structure.
Additional Notes:
Before moving WordPress from a subfolder to the root directory, ensure that all plugins and themes are updated to their latest versions. This helps avoid compatibility issues after migration. Next, verify your permalink structure by going to Settings > Permalinks in your WordPress dashboard. Sometimes, permalinks can revert to default settings, so double-check to ensure they are configured correctly. If needed, simply click Save Changes to refresh the settings.
Additionally, if you use caching plugins or if your host has server-side caching, be sure to clear these caches after moving the files. This ensures that your visitors see the updated version of your site with the new root directory URLs instead of cached versions of your subfolder URLs.
Following these additional steps carefully will help ensure a smooth migration of your WordPress site from the subfolder to the root directory without encountering significant issues or downtime.