Quick Tip: Upgrading Drupal from 6.x to 6.y

Shakib Mostafa // March 2011

I recently received this inquiry from one of my Drupal workshop attendees and thought it might be helpful to some folks. Many of you have still not made the leap to Drupal 7 and might be looking to simply upgrade within different versions of Drupal 6. Here are some quick instructions to make life easier for you. (I actually found that this information is not that easy to find from a Google search. I will also be posting this on Drupal.org).

On your browser, log in as admin and put site in maintenance mode.

  1. Create a backup of your database.
  2. Create a backup of your DRUPAL_ROOT (Drupal root directory - the directory where sites, modules, themes, update.php etc lives.)
    Note: you may need to double check if .htaccess was backed up, sometimes it has special settings.
  3. Download and uncompress the Drupal 6.y version that you want to upgrade to in a location different than the DRUPAL_ROOT.
  4. APART FROM “sites”, delete all directories from the DRUPAL_ROOT (includes, misc, modules, profiles, scripts, themes)
  5. APART FROM “sites”, move all files and directories from the new Drupal download into the DRUPAL_ROOT
  6. Using the diff command or otherwise, check the differences between the old .htaccess and the new .htaccess files.
  7. On your browser, go to http://yoursite.com/update.php and click on the continue button.
  8. In the “Drupal database update” page, click on “Select versions” and you should see that the “system module” has version preselected. Scroll down and click on “Update”
  9. Test as much of the site as possible to see if things are still functional. If anything breaks, restore the entire site and database from backups and contact Drupal consultants for help.
  10. If things work out, unset maintenance mode from your browser.

Remember, backup is the key! If you have a staging site, do this there first.