Drupal 7: Updating the Core

These steps tell you how to update Drupal core. For example, when Drupal moves from 7.41 to 7.42, that's a core update. If you are set for e-mail updates, you'll know about it. For the OSTraining video, see Update Using cPanel.

Caution: You cannot simply overwrite your Drupal installation—in other words, wipe out your older code and replace it with the newer. You do not want to overwrite the existing sites folder, or the .gitignore or .htaccess files.

  1. To begin, back up your existing Drupal installation first:
    1. Go to your cPanel.
    2. Select public_html in the right panel.
    3. Click Compress and select .gz.
    4. Select the resulting .gz and copy it to your local computer.
  2. You will also want to back up your database. See backing up a Drupal database.
  3. Before you begin the update process, put your Drupal site into maintenance mode: Configuration > Development > Maintenance mode. Click Put site into maintenance mode , then Save configuration.
  4. When you know that a new release of Drupal has been occured, go to Reports > Available updates. To save some hassle, click on the new release number. For example, if you are updating from 7.41 to 7.42, click on 7.42.
  5. If you followed the preceding step, you'll go to a drupal.org site. Download the .gz file corresponding to the new release to your own computer.
  6. Go to cPanel/File Manager for your account, and upload the .gz file to public_html. Make sure you are in public_html. (For the spring 2017 course, the URL is followed by a tilde and your account, for example,
  7. Now, still in File Manager, select the .gz file and click Extract to unzip it.
    Note: This will create a separate folder. For example, if you had initially installed 7.41, you will now have a 7.42 folder at the same level. (Make sure you don't have the earlier .gz file in public_html.)
  8. Select all the new Drupal core files (in this example, drupal-7.42) except for:

    sites (folder)

    and move them to the folder originally containing the old Drupal core files (in this example, drupal-7.41).
  9. Run the update.php commmand in the web page for your Drupal site. For example,
  10. To ensure this action worked, access this URL (assuming you updated to 7.42): http://your_url/~your_account/. (You know that index.html displays a site without typing it; index.php is functioning the same way—no need to type it.)
  11. Double-check your new installation in a web browser, remembering to use the new release number: for example, assuming you are updating to 7.42, use this URL: http://your_url/~your_account/
  12. Now you take your Drupal site out of maintenance mode: Configuration > Development > Maintenance mode. Uncheck Put site into maintenance mode , then Save configuration.
  13. Now, take a look around your Drupal site to see if everything looks the same.

Note: Updating Drupal core does not update the contributed modules and themes you have downloaded and installed. Drupal sends you separate notices on that; plus you can go to Reports > Available updates to see what's new.

Programs and information provided by davidm@austincc.edu.