If you have built WordPress in a subdirectory for testing, or have accidentally installed it in the wrong directory, you can follow this guide to help you move it.
If you have just installed WordPress, it may be easiest that you simply uninstall it, and reinstall it in the correct directory. If you do not wish to do so, and would rather move it, please keep reading.
You have installed WordPress in the wrong directory, and are unsure what to do. Do not worry, here is what you can do.
- Firstly, before trying to move your WordPress installation, it is important to backup your content!
- Go to the Directory where you have installed WordPress.
- Copy the Files to a the New Directory where you would like to move it to.
- Go to your phpMyAdmin, and locate the database.
- Once you are looking at your Database Tables, look for the wp_options table, and click Edit.
***Depending on the table prefix, it may be different. This is based on the prefix of wp_*** - Look for siteurl, and update the value to the new URL.
- Look for home, and update this value as well to the new URL.
Now that the URL has been updated for WordPress, and the files moved, you can test to ensure that it is working normally. In some cases, you may need to update image URL’s, or fix the permalinks to reflect the change in location.
If you are still having issues with moving your WordPress installation, WordPress provides other methods to do so here – Moving WordPress