Upgrading from previous versions

Last modified: July 4, 2009 - 04:26

The Drupal Project is constantly being updated through the work of many talented people (see The Drop is Always Moving!).

As a site owner or administrator, you should plan on regular upgrades to your site installation (both Drupal Core as well as contributed modules you are using). This section details upgrading your Drupal installation. It covers both major and minor version upgrades to your Drupal site.

Are you in the right place? If you are a contributed module maintainer looking for information on how to upgrade your contributed module, please see the Updating Modules section of the Developer Guide handbook. If you are a themer looking to update your theme, see Converting a Theme to a Later Drupal Version in the Theming Guide handbook.

A few notes:

  • Warning: As with any software upgrade it is critical for you to have a current, tested backup of your site.
  • At any given time, only two major versions of Drupal are supported. At time of writing, 6.x is the latest major version, and 5.x is still supported, so 4.x is no longer supported.
  • If you are upgrading from one minor version to another, within the same major version (e.g. from 6.0 to 6.3), it is fine to skip -- you do not need to install all the minor versions in between.
  • If you are upgrading from one major version to another (e.g. from 4.7 to 6.10), you should not go directly. The sequence to follow is:
    1. Upgrade to the latest minor version in the major version you're currently on (e.g. if you are on 5.5 and want to upgrade to 6.10, and there is a 5.12 version out, upgrade to 5.12 first).
    2. Then jump to the latest minor version in the next major version (e.g. if you were on 4.7, your next step would be 5.12, or whatever the latest 5.x version is).
    3. Continue this until you get to the version you want to stop at.
  • You can find information on upgrading in three locations -- be sure to read all of it carefully before you upgrade:
    1. The UPGRADE.txt file packaged with your Drupal files.
    2. The page announcing the release of your version (e.g. http://drupal.org/drupal-6.2 for Drupal 6.2). You may also need to check the release pages of earlier versions if you are upgrading by more than one minor version (e.g. from 6.0 to 6.2).
    3. The other pages of this handbook section.

References

Having Problems?
For problems during your site upgrade, instead of commenting here, please read the project page and, if necessary, post an issue there:

Upgrading Drupal using a Patch File

QuangVan - May 2, 2009 - 18:15

Just wanted to note that you could upgrade Drupal using a Patch File.

Full Details Here: Upgrading Drupal with Patch File

You can also download the patch Files here:

Upgrade Drupal Easier

Haven't tried it myself, but having upgraded Drupal the traditional way, the Patch method seems easier.

Regards,
Quang

Upgrade Drupal in four easy steps with Drush--for minor upgrades

greg.1.anderson - May 15, 2009 - 17:06

First, put your site offline and make sure you have backups as described above. Then, from your Drupal root directory:

  1. drush dl
  2. mv sites/all/modules/drupal-VERSION /tmp
  3. rsync -rltD /tmp/drupal-VERSION/ .
  4. drush updatedb

Drush dl without any parameters will download the latest version of Drupal for you. Strangely enough, it puts it in the 'modules' directory, so we just move it out of the way. Next, we rsync the files from the new version of Drupal over the old, preserving permissions. (Don't forget the trailing slash at the end of the Drupal path.) After that, you're ready to do a "drush updatedb" and put your site back online.

Fast and easy!

Watch your robots.txt and .htaccess files!!

Berto - June 20, 2009 - 03:09

I need to add one important comment. If you copy a new version onto an old version, make sure that you do NOT overwrite your robots.txt and .htaccess files if you have custom ones.

This happened on one of my recent upgrades in Drupal 5.x and I bombed out both files, and my 301 redirects in .htaccess and disallow tags in robots.txt got lost for a month. Was definitely bad for business, so learn from my mistakes :)
- Berto
-- Founder, Discount Supplements - http://www.PricePlow.com

 
 

Drupal is a registered trademark of Dries Buytaert.