Upgrading Drupal the easy way

I just upgraded this site to Drupal 5.2. The package came with upgrading instructions consisting of 11 steps to complete the upgrade proces, but after reading it a few times I realized it could be done easier.

Here is a synthesized version of the upgrade instructions that came with the package:

  1. Backup your database and Drupal directory. Especially your site settings, custom modules and themes, and files folder.
  2. Log on as the user with user ID 1. User ID 1 needs to be logged in so that you can access update.php (step 9) which can only be run by user ID 1. Do not close your browser until step 10 is complete.
  3. Place the site in "Off-line" mode, to mask any errors from site visitors.
  4. Disable contributed modules and switch to a core theme
  5. Remove all of the old files and directories from the Drupal installation directory.
  6. Unpack the new Drupal files and directories into the Drupal installation directory.
  7. Copy the backed up files/directories from step 1 to the Drupal installation directory.
  8. Verify the new configuration file to make sure it has the latest and correct information.
  9. Re-install contributed modules. Check if they are compatible with the new version
  10. Run update.php by visiting http://www.example.com/update.php
  11. Finally, return site to "Online" mode

Now, the thing is you don't have to do things like disabling contributed modules and themes if you install them right away instead of later on.

So, here are my simplified instructions:

  1. Unpack the drupal 5.2 folder on your local system
  2. Copy all your specific folders/files (files, themes, modules and settings.ini) to the right place in this folder
  3. Login as user 1
  4. Enable offline mode
  5. Delete all files of your Drupal installation on the webhost
  6. Upload the files from the drupal 5.2 folder to your webhost
  7. go to http://www.example.com/?q=user and login again
  8. Run http://www.example.com/update.php
  9. Enable online mode

These instructions worked fine for upgrading from 5.1 to 5.2. If you do are more drastic upgrade (e.g. from 4 to 5) you should only follow this method if you don't have any contributed themes/modules because otherwise you need to upgrade your modules.

Add comment