ICT:Drupal - HowToDo minor updates: Difference between revisions
Created page with "= 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. <pre> Drush: drush state:set system.maintenance_mode 1 </pre> UI: Navigate to Configuration > Development > Maint..." |
No edit summary |
||
| Line 16: | Line 16: | ||
=== Check for updates === | === Check for updates === | ||
<pre> | <pre> | ||
bash composer outdated "drupal/*" | bash | ||
composer outdated "drupal/*" | |||
</pre> | </pre> | ||
This identifies available updates for Drupal core and its dependencies. | This identifies available updates for Drupal core and its dependencies. | ||
| Line 23: | Line 24: | ||
Use the following command to update the core recommended package and all its dependencies: | Use the following command to update the core recommended package and all its dependencies: | ||
<pre> | <pre> | ||
bash composer update "drupal/core-*" --with-all-dependencies | bash | ||
composer update "drupal/core-*" --with-all-dependencies | |||
</pre> | </pre> | ||
Revision as of 22:44, 5 March 2026
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.
Verication
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.