Drupal Maintenance Tips: Are you up to date?

Best Practices for Updating Drupal Core and Modules

Software updates are not something administrators look forward to. Depending on the system and the software to be updated, the process of updating can require a good bit of time and effort. Fortunately, updating Drupal is a relatively easy process in most cases. Various Drupal modules are updated on a regular basis, and the core is also updated (minor changes) and upgraded (major changes, new initial digit in version number) over time.

A major upgrade requires updating to the latest core version before applying the major release. For example, if 6.19 is the current version of Drupal 6, and your site is running 6.13, you need to update to 6.19 before you upgrade to the new major version 7.

Note that you cannot skip major releases. Therefore, in order to upgrade a Drupal 5 system to Drupal 7, you need to upgrade from Drupal 5 to Drupal 6, and from there to Drupal 7.

Module-specific update instructions

Step one is to read the module’s project page “Read Documentation” link, as well as the instruction files (READ ME, etc.) that come with the module’s installation file for any specific update instructions. Modules requiring the use of third party libraries, for example, often have special instructions. Make sure you understand all the instructions before updating.

Back up your database and files

Since your  website’s database contains all of the content, as well as its settings and layout, it’s always a good idea to back up your DB before an update to make sure that you can revert to a functional system if a major problem crops up.

Maintenance mode

Drupal.org also recommends that you put your site in maintenance mode when running an update. You just  go to /admin/settings/site-maintenance in your Drupal Administration pages and select “Put site into maintenance mode”.

Replacing the module code with new version

The next step is to download a copy of the new module/core from the drupal.org project page, or use the Update Module link in  your site’s update status report.

Then delete the entire directory of the outdated module/core you are replacing and upload the new one just like you were installing the module for the first time.

Run update.php

You must run update,php after you have installed the new core or module version. Update.php is a script that updates your  database after updates or upgrades.  This step is required because a new version often changes the structure of the database, and the database must be adjusted to the structure of the new core or module.

Note that if you are updating or upgrading multiple sites, you must run update.php separately on each site.