Jump to content

ICT:Drupal - HowToDo minor updates

From Costa Sano MediaWiki
Revision as of 22:45, 5 March 2026 by Mngr (talk | contribs) (Verication)

How to do a minor Drupal 11 update?

To perform a minor update in Drupal 11 (e.g., from version 11.1 to 11.2), you should use Composer, which is the industry

Preparation

Backup: Always create a full backup of your database and files before proceeding. Maintenance Mode: Enable maintenance mode to prevent users from making changes during the update.

Drush: drush state:set system.maintenance_mode 1

UI: Navigate to Configuration > Development > Maintenance mode. Check Status: Review the Status Report (Reports > Status report) to ensure there are no existing errors or warnings.

Execute the Update via Composer

Run the following commands from your project root:

Check for updates

bash 
composer outdated "drupal/*"

This identifies available updates for Drupal core and its dependencies.

Update Drupal Core

Use the following command to update the core recommended package and all its dependencies:

bash 
composer update "drupal/core-*" --with-all-dependencies

Note: If you use a specific version requirement in your composer.json, ensure it allows the minor update (e.g., ^11.0 allows all 11.x versions).

Finalise the Update

After the files are updated, you must apply any database schema changes:

Run Database Updates:

Drush: drush updatedb

Browser: Visit yoursite.com/update.php and follow the prompts.

Clear Caches:

Drush: drush cr

UI: Navigate to Configuration > Development > Performance and click "Clear all caches".

Disable Maintenance Mode:

Drush: drush state:set system.maintenance_mode 0

UI: Uncheck "Put site into maintenance mode" in the settings.

Verification

Return to the Status Report page to verify that the site is now running the new minor version and that all system checks are green.