Before moving or making changes to your WordPress site, you should always make a backup!
- Create the new location for your WordPress core files. Use the option in cPanel to create a subdirectory if necessary. You can also use FTP or the cPanel File manager. Make sure that any existing files in the new location will not interfere with the files that you’re bringing over.
- Login to the Administrator Dashboard.
- Click on Settings, then click on General.
- Change the WordPress Address (URL) to the new location of your WordPress core files.
- Change the Site Address (URL) to the new location URL.
- Scroll to the bottom of the page and click on Save Changes. The move is not complete at this point so don’t try to view your site, yet.
- Move your WordPress files and folders into the location new location. After the files have been uploaded, try viewing the site with your new URL. You should also verify that using your Administrator dashboard is working.
This completes the majority of the move of your WordPress site to a different folder, but there are a couple other very important things that you will need to check before the move is 100% complete:
- If you were using anything but the DEFAULT permalink setting, then you need to reset your permalinks.
- If you were using image or media links, you will need to update based on the new location. You can go directly into the database to do this, or use a plugin like Better Search Replace. This plugin allows you to quickly update your database tables with the new path. If you need to see the path for your media, you can see it in the media library by simply clicking on the media in question, or by going to the post and click using the insert/edit icon for links.
- Double-check your menu structures, in order to make sure that they are working correctly.