Introduction to upgrading

Last modified: August 3, 2009 - 20:04

About every 9 to 12 months, a new major version of Drupal is released that introduces many new features. If you are not running the latest major version then you will need to upgrade in order to take advantage of these features. Only 2 major versions are supported at a time (currently the 5.x and 6.x series).

Between major releases there are usually several minor releases that fix security issues and also fix bugs reported by the community. Upgrading your Drupal site to the latest corresponding minor version is strongly recommended in order to close any known security vulnerabilities in the version of Drupal core that you are running.

Upgrading your Drupal site involves several steps, which are described in more detail on the other pages of this section of the handbook:

  1. Backup your existing site and database.
  2. Place the site in "off-line" mode (Administer >> Site configuration >> Site maintenance).
  3. Download and unzip the new Drupal files, and carefully review the information and instructions available in the file UPGRADE.txt (located in the root of your installation directory).
  4. Switch your site's theme to a default theme (Garland or Bluemarine), and disable all contributed or customized modules.
  5. Upload the new Drupal files to your server.
    • Be aware that if you browse to your site at this point in the process you will see the standard installation script. Since you are only upgrading you should NOT run this script. If you run the installation script it will likely produce errors.
    • NOTE: If you are upgrading to a new major version (e.g. 5.x to 6.x), it is recommended that you remove the old version's code and modules completely before uploading the new version's code.
  6. Run the update.php script, which will update your database.
  7. Re-enable your contributed modules and run update.php
  8. Re-enable your theme and if necessary run update.php

However, to make your update run as smoothly as possible, there are various preparations that experienced Drupal users do to guarantee the least frustrating upgrade and minimal interruption to their users. These best practices are represented in this full tutorial along with the basic steps.

NOTE: Before deciding to perform a major upgrade ( e.g. 5.7 to 6.x), you should check to see if the contributed modules you rely on have a compatible version for your planned Drupal upgrade. Old versions of modules will not run on an upgraded version of Drupal (e.g 5.7 modules do not work on a Drupal 6.x site). However, if you are only upgrading from one minor version of Drupal to another (e.g. 6.2 to 6.4), your modules should still continue to work.

Site online message

miriamnz - June 11, 2009 - 02:06

It would be truly excellent if update.php?op=results contained a link to the site maintenance page.

Miriam
Otaki, New Zealand

&

scottrigby - June 26, 2009 - 20:05

with a destination back to update.php >=)

It's really that simple!

nixnixnix - July 16, 2009 - 17:06

Disable all my modules, then re-enable them? This is a tedious and error-prone process. Are their any plans to more thoroughly automate upgrading? Having to go through this every time a new security exploit is released is making me want to stab my eyes out with the corner of my keyboard.

This article is about

Bevan - July 16, 2009 - 23:48

This article is about upgrading major drupal versions, e.g. Drupal 4.7.x to 5.x, 5.x to 6.x, 6.x to 7.x, 5.x to 7.x.

It is not recommended you disable all your modules when you update for a security release (aka minor release), e.g. 6.14 to 6.15, 6.0 to 6.15, 5.19 to 5.20.

Drush

redspire - July 17, 2009 - 03:44

Drush (http://drupal.org/project/drush) can help a lot with those suicidal feelings. ;)

Drush is a PHP script that lets you perform operations on a Drupal site from the command line. It really takes the pain out of managing modules during both types of upgrade, in addition to a bunch of other stuff.

With it you can download, enable, and disable modules, perform database upgrades, and more -- with a few shell commands.

So... put down the sharp objects ... and pick up Drush!

Incorrect password

cl4551f13d - August 16, 2009 - 19:13

When upload the files of drupal 6. x by FTP, some files could not be replaced. The following message appears:

http://i85.servimg.com/u/f85/12/25/17/96/captur10.png

How i can solve that problem?

Carlos

Followed instructions, cannot log back in.. Help!

cupper3 - September 4, 2009 - 22:23

Followed steps 1) and 2) above. Then I inadvertently went out of the site.

Now I cannot log back in.

How does one log in when the site is shown as being down for maintenance???

You're screwed

RichieRich - September 8, 2009 - 02:31

Unfortunately there's no way out of this situation. It's a but in Drupal and you'll have to rebuild your site again from scratch....just joking. Simply access the 'user' page via the URL www.example.com/user. From here you'll be able to log in again. That one caught me out before too.

/user

victor.stan@gma... - October 3, 2009 - 05:12

Just type in /user after you URL

UPDATE

Never mind, too slow for the joke...

- V

/user

sm2iar - October 5, 2009 - 15:57

Well it doesn't work for me...

It just returns to the maintenance-message...

Haven't created any users yet, could that be the problem?
Isn't there a address directly to the admin-login?

Mike

login with the first user

sanjith - October 13, 2009 - 06:30

Then u can login with the first user (which u created at drupal installation)

 
 

Drupal is a registered trademark of Dries Buytaert.