11 Easy Steps to Upgrade Your Drupal Core

B2B Drupal Asset Banner
Here are 11 easy steps to follow when upgrading your Drupal core.

This is a quick look at the steps involved in upgrading your core Drupal install. This article assumes you know what you're doing and should only act as a quick reference. 

Before we get started, it's important to know that you can't upgrade from one major Drupal release to another. For example, you must first upgrade Drupal 6.14 to Drupal 6.22, then upgrade to Drupal 7.xx. You can, however, skip numbers when upgrading from Drupal 6.14 to 6.22. More information can be found in the UPGRADE.txt file included in your Drupal core files.

The hacked status drupal notification

Tip: if you know you've made changes to the core install or perhaps just want to make sure you know of all the changes, try Hacked!. It's a great module that will tell you which files within your core and module folders were changed. If you install Diff, you'll get line by line info on exactly what was changed. Hacked! is for use on your local server, not on a production site.

1. Back Up

Make a backup of your site files and database. Make sure you include everything (.htaccess files are often hidden).

2. Go Off-line

Navigate to Admin > Site Configuration > Site Maintenance. Enter a friendly note, select Off-line and Save Configuration.

3. Switch To Garland

Next, navigate to Admin > Site Building > Themes and select Garland as your default theme. The importance here is that you select a core theme, one that came with your original Drupal install...it doesn't necessarily have to be Garland.

4. Disable Modules

Make a note of all of the modules you have enabled, then go down the list and deselect each checkbox. Click Save and go back through until each checkbox is deselected.

5. Swap Files

Replace your old/current Drupal files with the new files. Do not do this within your backup copy; it is for backup purposes only. Do this on your server, live or locally, wherever you are doing the upgrade. Grab your files (sites/default/files), modules (sites/all/modules), and themes (sites/all/themes) directories and place them in the new directories accordingly.

6. Recreate Changes

If you made any changes to core (which you of course only did for testing and will remove because it's bad practice), repeat those changes. Remember the Hacked! module to help tell you which files within your core and module folders were changed.

7. Run Update.php

Go to yourdomain.com/update.php and follow along.

8. Reenable Modules

You're almost done, go back to your modules page, admin/site-building/modules and enable all the modules you had enabled originally.

9. Repeat Step 7

Go to yourdomain.com/update.php and follow along.

10. Switch Back to Original Theme

Navigate to Admin > Site Building > Themes and select your original theme.

11. Go Online

Navigate to Admin > Site Configuration > Site Maintenance. Select Online and Save Configuration. View your site, flush your cache and if everything looks as it was before you upgraded, breathe a sigh of relief. However, if things have gone awry, the Drupal community is resourceful and eager to help.

I hope that was easy enough to follow. Some supporting links to help get you through it: