In this post we are going to be walking you through the process of how to move your WordPress site from a subfolder to the folder for your domain.
- For this guide I will be using the following domain as an example: site.com
- For the WordPress install in the subfolder I will be using: site.com/wordpress
- The first thing you will want to do is make sure that anything in the folder for the domain that you want to keep is moved or backed up. That way, what we will be doing in the following steps will not overwrite it.
- Next, login to the admin dashboard at site.com/wordpress (the site in the subfolder) and once logged in we will go to the Settings > General area.
- Once there you will see two URLs at the top and they will be the domain/subfolder (so using my example it will be http://site.com/wordpress).
- You will then want to remove the subfolder (again using my example it would then be http://site.com)
A word of caution: Once you change the URLs and save those changes you will no longer be able to access the site at its current location (site.com/wordpress).
- Once the URLs are changed the next step will be to go to your hosting account’s control panel and to whatever file management they have (most will call it the File Manager) and then move all the files from the subfolder into the folder for the domain.
NOTE: So if the domain you are working with is the main domain, then on most hosting it will use the public_html folder and your subfolder would be something like public_html/wordpress. So you would need to move the files from the public_html/wordpress folder into just the public_html folder.
- Once the files are moved then you should now be able see the site normally and login to the admin dashboard using just the domain name in the URL (again, using my example I would be able to just go to site.com/wp-admin , the normal WordPress admin login)
- If you have issues with any pages giving 404 errors or not working, you will first want to try resaving or changing the permalinks. You can do that by going to Settings > Permalinks in the admin dashboard and either just re-saving them (clicking the save button without changing anything) or change them to something else and then save that.
- If you still have issues after that you can try using a plugin like Velvet Blues to make sure that any old URLs (ones that were using the subfolder) are replaced with the new URL (just the domain name).
- If neither of the above help then you would want to contact your hosting company to see if there may be any other issues.