13.6. Updating a Module

Last updated on
14 April 2025

Goal

Update a contributed module and run the Database updates script.

Site prerequisites

Steps

Before you start, check for module-specific update instructions. This is typically necessary while updating modules that involve the usage of third-party libraries. Read and understand all module-specific requirements before proceeding with the updates. To find instructions, check the module’s project page Read Documentation link.

To view further instructions, download the tar.gz or .zip file from the project page to your local computer. Unzip the file and look for README.txt, INSTALL.txt, and UPGRADE.txt that come with the module’s installation file. Also, review the release notes on the project page by clicking the version number you’re downloading.

Release notes link

You can use the administrative interface or Drush to update a contributed module. If you are updating a custom module rather than a contributed module, if you see a message saying Installing modules and themes requires FTP access to your server, or if the steps below do not work to obtain the new module files, follow the steps in 「Manually Downloading Module or Theme Files」. You can then continue here with step 6 in the instructions for the administrative interface below.

Using the administrative interface

  1. Put your site in maintenance mode. See 「Enabling and Disabling Maintenance Mode」.
  2. In the Manage administrative menu, navigate to Reports > Available updates > Update (admin/reports/updates/update).
  3. Find and check the module in the list. Click Download these updates for the module.

    Available updates

  4. Click Continue.
  5. Click Run database updates. If you obtained the new module files manually, start with this step, and reach the database updates page by typing the URL example.com/update.php in your browser.
  6. Click Continue and apply all updates. The database update scripts will be executed.
  7. Click Administration pages to return to the administration section of your site.
  8. Take your site out of maintenance mode. See 「Enabling and Disabling Maintenance Mode」.
  9. Clear the cache (refer to 「Clearing the Cache」).

Using Drush

  1. Find the project name for the module you wish to update. It is the last segment of the module’s project page URL. For example, if the project URL is https://www.drupal.org/project/admin_toolbar, the project name is "admin_toolbar".
  2. Run the following Drush command, giving the project name (for example, admin_toolbar) as a parameter (if you have more than one module to update, add the additional module project names to the end of the command, separated by spaces):

    drush up admin_toolbar
  3. Follow the instructions on the screen.

Expand your understanding

Additional resources

Drupal.org community documentation page "Updating modules"

Attributions

Adapted by Boris Doesborgh, and Sarah German at Advomatic, from "Updating modules", copyright 2000-2017 by the individual contributors to the Drupal Community Documentation.

 

This page is generated from AsciiDoc source from the User Guide. To propose a change, edit the source and attach the file to a new issue in the User Guide project. PDF and e-book formats are available on the User Guide project page.

Source file: security-update-module.asciidoc

Help improve this page

Page status: No known problems

You can: