Update

An update moves a Drupal site to a newer release of core, a module or a theme; the core Update Status module reports which releases are available.

Learn DrupalDrupal glossary

An update is a newer release of Drupal core, a contributed module or a theme that you install on an existing site. In Drupal 11 an update has two parts: you replace the code with Composer and then you run the database updates that the new code ships. Skipping the second part leaves the site half updated.

How updating works in Drupal 11

Find out what is outdated. The core Update Status module checks for new releases during cron runs. Its Available updates report is at /admin/reports/updates, and its settings page lets you check daily or weekly and send email when a new release appears, either for all newer versions or for security updates only. On the command line, Drupal.org's guide uses composer outdated "drupal/*".

Install the code. For core, the guide runs composer update "drupal/core-*" --with-all-dependencies. Drupal.org has a separate Composer guide for modules and themes.

Run the database updates. Open /update.php or run drush updatedb. drush updatedb:status lists what is pending. The access check for update.php asks for the permission "Administer software updates", unless update_free_access is set in settings.php. Drush enables maintenance mode while updatedb runs and clears caches when it finishes, unless you pass --no-cache-clear. The code behind these updates is described in Update API.

Keep configuration in sync. If the site uses configuration management, export it after the update with drush config:export and commit it. Drupal.org warns that uncommitted configuration is reverted by the next import.

Example

A site on Drupal 11.4 sees a new patch release in the Available updates report. A developer backs up the database, runs the Composer command on a copy of the site, runs drush updatedb and drush cache:rebuild, exports configuration, and rechecks the Status report. The same commit is then deployed with composer install on the staging site and the live server, and the database updates run there too.

Common mistakes

  • Updating the live site first. Drupal.org's deployment guide has you update and confirm everything on a local copy, then repeat the steps on the server.
  • Running composer update on the server. It fetches the latest versions that match composer.json, which may be newer than the ones you tested. Drupal.org's deployment guide offers the alternative: move the tested composer.lock to the server and run composer install.
  • Deleting a module's files before uninstalling it. Drupal.org says to uninstall on the server first, then remove the package with Composer.
  • Leaving update_free_access on. It lets anyone run update.php, and the Status report flags it as an error.

For marketing and content teams

Updates are the routine that keeps the site secure and working. The database step puts the site in maintenance mode, whether it runs through Drush or update.php, so ask when updates are scheduled and whether a security release is out. After a release, check the key pages while logged out; the core update guide ends with the same test.

Sources

Questions about Update

An update moves a site to a newer release inside the version it already runs, such as Drupal 11.3 to 11.4. An upgrade moves it to a new major version. Drupal.org keeps separate guides for the two; its Composer core guide covers minor and patch updates only.

Run the database updates every time you update code. Drupal's own help text says to run the update script each time you update software. The Status report shows Database updates as Out of date while any update is pending, so you can also check there.

Not since Drupal 11.2.0. The change record says the UI for updating contributed modules and themes was removed in that release, and the code behind it is deprecated for removal in Drupal 12. The Update Status pages still report what is outdated; Composer installs it. The change record points to the contributed Automatic Updates module for in-site updates.

Related terms

All Drupal terms from A to Z