Move WordPress from one directory to another

From Hostek.com Wiki
Jump to: navigation, search

Moving WordPress between directories

Moving WordPress from one static URL to another can be tricky for some sites. We'll show how we recommend performing this procedure, which will work for most sites.


For this particular example we'll act as if we're moving the site from the /wordpress directory to the root directory of the site " / ".


1. First login to your WordPress dashboard. If you're domain is pointing correctly you should be able to use: http://domain.com/wp-admin

Just replace your-domain.com with your actual domain


2. Now in the left-hand navigation menu find and select the option for Settings.

Wordpress site home urls.png


3. You will now see ( as shown in the above screenshot ) the home and site URL. You'll want to change this to the destination directory instead of being the old subfolder you used to host the WordPress site in. Click "Save" once you have updated this home and site URL to your desired sub-folder.

Note: Do not browse the site yet as there is more to do


4. Now.. you'll want to use FTP, File manager, RDP, etc. to move the wordpress files from the directory it previously resided in to the new directory. For example we'd move all the WordPress files and folders from the /wordpress directory and move them to our new destination directory " / ".


5. Now once step 4 is done try logging into your WordPress dashboard ( You may have to use the /wp-login.php file instead of using /wp-admin ). Note: You will be browsing to the new location of where WordPress is hosted and not the old URL, so in our case we'd browse to: http://domain.com/wp-admin


6. Potentially: You may need to go to the " Settings > Permalinks " section of your Wordpress dashboard and re-save your permalink.


7. Important: Additionally any media files, uploads, hard-coded URLs that are referring to the old site URL will have to be updated. Unfortunately, these are all within the WordPress database so it'll have to be updated across your entire WordPress database which could take some time doing manually. Instead we recommend using one of the below plugins that may help with a find and replace type functionality to find the old URL and replace it with the new URL:

  • Velvet Blues Update URLs
  • Better Search Replace plugins


8. Another note for something to check would be menus. Most of the time a find-replace functionality will fix any coded links referring to the old URL in the menus.. but we'd recommend checking all your menu items and updating the menus directly within your WordPress dashboard if needed.