Moving WordPress Files Around Servers

To move WordPress files from location to location within your server, thus changing its URL, first of all requires one of two steps: if the core files are to be moved into a new directory, this directory will first have to be created; or, if WordPress is to be moved into the root directory, all index.php and other relevant files to be copied must be backed up or/and moved (ensure the root directory has been prepared).

Next, it is necessary to log into the blog and access the Administrations Settings General panel, where the new location for the core files (WordPress) needs to be added to the WordPress address box (URI). The location for the Blog address (URI) also needs to be changed (this needs to match the WordPress (URI)). Settings should then be saved. It is important not to try to access the blog at this point! WordPress 2.0 users need to delete the wp-content/cache folder before moving on to the next step.

All WordPress core files, including all files contained within the old directory/ sub directories, are now moved to their new location. If Permalinks are used, the Permalink structure has to be updated to the.htaccess file (located in the directory the main file for the index.php is situated in) by accessing the Administration Settings panel for Permalinks.

It is possible that some uploaded images will be missing. This can be rectified by changing the path to each image directly in the SQL database. Instructions on how to do this can be found in a tutorial available on the Tamba2 website.

In order to avoid any new uploads ending up in the old folders, the settings for the “store uploads folder” also need to be changed. This is done in the Administration/ Settings/ Miscellaneous panel. The new location must also be updated for existing media/ images upload links.

Depending on the user’s current ISP, some permissions may have been changed from previous settings. Any files showing 0000 permissions should be reverted back to 0644 permissions.

Should various menus be supported by the theme, links to the home page may need to be updated from old embedded subdirectories; this is done within the Appearance/ Menus panel. It is vital to set URI locations before any files are moved. However, it is possible to rectify the situation if files have accidentally been moved before setting URI locations.

Once these steps are completed, the new site needs to be tested and, if necessary, the new address passed on to other users.

For more detailed, in depth instructions on how to copy WordPress, including changing site URLs, setting up directories and rectifying problems, as well as how to move WordPress into a different server, users may want to visit the excellent WordPress codex website.

Written by pagman13

…………

…………

Share this article