Moving a WordPress installation from a subfolder to the root directory (or from one subfolder to another) can be necessary for various reasons, such as reorganizing your website structure or improving SEO. In this guide, we’ll walk you through the process of safely moving WordPress from a subfolder to the root directory, ensuring that your website remains accessible and functional.
Table of Contents
1. Preparation
Before you start, make sure to:
- Backup: Create a backup of your entire WordPress website, including files and the database.
- Understand the Structure: Know the current structure of your website and the desired new structure.
- Access: Have access to your hosting account and the ability to manage files and databases.
2. Moving WordPress Files
Follow these steps to move WordPress files from a subfolder to the root directory:
- Copy Files: Use an FTP client or your hosting file manager to copy all files from the subfolder to the root directory.
- Update .htaccess: In the root directory, find the .htaccess file, and update the “RewriteBase” if needed.
3. Updating Settings
Update your WordPress settings to reflect the new location:
- Update Site URL: Go to “Settings” > “General” in the WordPress dashboard and update the “WordPress Address (URL)” and “Site Address (URL)” to the new location.
4. Updating Permalinks
If you’re using custom permalinks, you’ll need to update them:
- Go to “Settings” > “Permalinks”: In the WordPress dashboard, go to the “Permalinks” settings page.
- Save Changes: Simply click the “Save Changes” button to update permalinks. This refreshes the permalink structure.
5. Testing Your Website
After moving, thoroughly test your website:
- Browse Your Website: Make sure all pages, posts, and media are accessible and display correctly.
- Test Links: Test internal and external links to ensure they point to the correct location.
- Check SEO: If you’re concerned about SEO, ensure that search engines index the new URLs properly.
By following these steps, you can successfully move your WordPress website from a subfolder to the root directory, maintaining its functionality and ensuring a smooth transition for your visitors.