Upgrading from previous versions

Last modified: May 24, 2010 - 20:39

To keep your Drupal site up to date, from time to time, you will need to perform minor Drupal upgrades (for example, Drupal 6.01 to 6.x). When there is a full version release, you will also need to perform a major upgrade (for example, Drupal 6.x to 7.x).

About Drupal versions

  • Major versions of Drupal's core (and the associated modules/themes) are represented in Drupal's version numbering system by the integer before the first decimal. Two major versions are supported at a time. The currently supported versions of Drupal are Drupal 5 and Drupal 6. When Drupal 7 is released, Drupal 5 will no longer be supported.
  • Between major releases there are minor releases that fix security issues and also fix bugs reported by the community. Keeping your Drupal site updated to the latest corresponding minor version is strongly recommended in order to close any known security vulnerabilities in the version of Drupal that you are running.

How to keep up to date on security announcements

  • Setting up notifications on your Drupal site (at Administer > Reports > Available updates in Drupal 7, and Administer > Reports > Available updates > Settings in Drupal 6).
  • Setting up notifications via Drupal.org by checking the "Security Announcements" box in the Edit > My Newsletters tab of your Drupal.org user account (you must have a Drupal.org account and be logged in to view this page).
  • You can also subscribe to the RSS feeds of the security announcements listed in the sidebar of the Security advisories page.

Minor and major releases have different upgrade procedures

  • If upgrading from one minor release to another, such as 6.03 to 6.16, jump straight to the latest release within that major version.
  • If upgrading from one major version to another, such as from 4.6 to 6.16, you must upgrade to the latest release within your site's major version (4.7), then the latest release within the next major version (5.22), and finally to the latest release within the current major version.

For more information on monitoring and managing module and theme updates for your Drupal site, see the Update manager module page.

Other upgrading information

For information on upgrading to the most recent version of a contributed module, see How to update a module. If you are the maintainer of a custom or contributed module, see Updating Modules. To update a theme, see Converting a Theme to a Later Drupal Version.

More upgrade information is available at:

  • The UPGRADE.txt file packaged with the new Drupal files.
  • Release announcements for the version to which you're upgrading.

Troubleshooting

If you experience problems during your site upgrade, see the Troubleshooting FAQ. Instead of commenting here, please read the module project page and, if necessary, post an issue or post a message in the forums.

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 easily with Drush

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

Update, 15 April 2010: Drush, the Drupal shell now supports updates of Drupal core via the drush update command for minor updates, and drush site-upgrade for major version upgrades.

drush update will do a minor update in-place on your site. Be sure to always work on a development copy, not your live site! Be aware that drush will replace all of your core and module files with clean copies of the latest release, so you should be sure to save any modifications you may have made to .htaccess and robots.txt files, or other customizations.

drush site-upgrade will copy your Drupal 6.x site to a new document root, upgrading it to the next major version in the process. This process might not work perfectly, but if it does fail for some reason, you can always put off your upgrade and try again when a new version is available.

Try it out; it's fast and easy!

Drush Drupal core update questions

jfro - December 22, 2009 - 16:56

Thanks for the Drush update directions. It went well, but I have a couple followup comments:

1. drush dl download the new Drupal version to the root of my existing Drupal root directory, not the "modules" directory as you indicated.

2. I was nervous about overwriting the "sites" and ".htaccess" files so I removed them from the new Drupal core before running the rsync command.

Do I need to delete them, or does your rsync command keep my original "sites" and ".htaccess" files safe automatically?

Thanks!

Watch your robots.txt and .htaccess files!!

Berto - November 2, 2009 - 17:05

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 :)

Thanks for the tip. I renamed

mot - June 18, 2010 - 16:31

Thanks for the tip. I renamed them to .rel, copied over my .htaccess and robots.txt from remote and used WinMerge to compare new and old versions with ease so I could even update those.

Drop cache_block table if you use the Block Cache module

Gregory Go - July 26, 2009 - 04:58

Block Cache's functionality is part of Drupal 6 core, so you don't need the module anymore. But they use the same table name.

update.php will fail to create the cache_block table if it already exists. (see http://drupal.org/node/200221)

Unfortunately, there's no uninstall option for the Block Cache module, so you will need to manually drop the cache_block table.

Suggested fix if you've already upgraded before dropping the cache_block table is to use Devel module to manually run the create table query.

(This is for upgrading from Drupal 5.x to 6.x. Oops, I should have put it on 6.x tutorial page instead. If a kind admin would move it... thanks!)

Upgrading from a minor release to another

suffering drupal - November 26, 2009 - 11:43

"If upgrading from one minor release to another, such as 6.3 to 6.14, jump straight to the latest release within that major version."
What does "jump straight to the latest release" mean? Just delete and substitute all the core modules and do an upgrade, or are there more essential steps to make?

Re: Upgrading from a minor release to another

juan_g - November 26, 2009 - 13:27

I think the meaning here is to upgrade in one step between minor releases 6.3 -> 6.14, with no need for 6.3 -> 6.4 -> 6.5 -> etc. On the other hand, for distant major releases, intermediate steps are necessary: 4.x -> 5.x -> 6.x.

The other point related to what you say is the not well documented difference between major upgrades and minor updates, which in fact are much quicker and easier. See for example The current UPGRADE.txt lacks instructions for minor updates (6.x -> 6.y).

http://drupal.org/node/340073

dashaver - November 30, 2009 - 03:39

This is also a very good page on the upgrade from v5 to v6
http://drupal.org/node/340073

 
 

Drupal is a registered trademark of Dries Buytaert.