Moving WordPress from a sub-directory to a root directory

Often when I am doing a wordpress installation conversion from a joomla site I install wordpress in a subdirectory and work on it in the background while the old website remains live.  When I am ready to swap I follow the following steps:

  1. Via FTP rename old website to take it offline (eg: websitename.com.au.old) – cheaters backup.
  2. Create a new directory for the new website. (recreate websitename.com.au, a clean directory)
  3. IMPORTANT before moving any files.  Login to WordPress Admin >  Settings > General. Change the WordPress Address and Site Address fields to be the root domain name. (remove the sub-directory).  Need to change both the WordPress address (URI)  and Site address (URL). 
  4. Save changes but don’t try to look at site now – it won’t work.
  5. Move the contents of the wordpress directory into the new root directory.
  6. Log into your WordPress Admin in the new location (ourdomain.com/wp-admin. Note, you may need to go to yourdomain.com/wp-login.php)
  7. If you are using Permalinks, go to the Administration > Settings > Permalinks panel and update your Permalink structure to your .htaccess file, which should be in the same directory as the main index.php file.
  8. Run Velvet Blues Update URLs plugin or the search and replace tool to fix any instances referring to old path name (eg: images etc)
  9. Go to Appearance > Menus and check menu links/update if needed.

Support Notes Relevant to this process:

From WordPress – Moving WordPress

Moving from Subdirectory to the Root

Tools Needed:

Search and Replace Script

OR

Update URL’s Plugin

Tags: