Skip to content

LocalGov Drupal CMS, upgrading from Drupal 10 to Drupal 11

Drupal 11 is supported for LocalGov Drupal CMS sites from release 4.0. Drupal 11 support for Microsites is still in progress — see Upgrading Microsites to Drupal 11 for that path.

Drupal 10 is supported until the release of Drupal 12, so there is currently no urgency to upgrade. We encourage people to test the upgrade process and report back how they found it.

If you run LocalGov Drupal without many modifications, upgrading should be straightforward. If you have a lot of additional contrib modules or custom code in modules or themes, the LocalGov part of the upgrade is still straightforward, but you will need to confirm that all your additional code supports Drupal 11 before you can upgrade.

Alongside the instructions here, also refer to the Drupal.org documentation on upgrading from Drupal 10 to Drupal 11.

Upgrade Status

The Upgrade Status module helps determine what needs to be done before you can upgrade.

composer require 'drupal/upgrade_status:^4.0'
drush en upgrade_status
drush cr

Then visit /admin/reports/upgrade-status to check the status of the site.

It is expected that there will be warnings for the Content Lock and Image Widget Crop modules and the LocalGov Drupal profile. These are updated as part of the upgrade process. Any other errors or warnings need to be resolved before continuing.

Basic upgrade for LocalGov Drupal

For a site without significant additional code, use Composer to update the packages required for Drupal 11 support, then update everything:

composer require drupal/localgov:^4.0.0 --update-with-dependencies --no-update
composer require drupal/core-recommended:^11.3 drupal/core-composer-scaffold:^11.3 drupal/core-project-message:^11.3 --update-with-dependencies --no-update
composer require drupal/core-dev:^11.3 brianium/paratest:^7.3 --dev --update-with-dependencies --no-update
composer require 'drupal/gin:^5.0' --no-update
composer update
drush updb
drush cr
drush cex

A more complex site

If your site carries additional contrib modules, custom modules or themes, work through these steps before running the basic upgrade above:

  1. Install all required updates (composer update).
  2. Install the Upgrade Status module and check the report at /admin/reports/upgrade-status.
  3. Ensure you are running PHP 8.3+ and a compatible database server (for example MariaDB 10.6+).
  4. Upgrade Drush to version 13 (composer require drush/drush:^13).
  5. Update all custom modules and themes so they support Drupal 11.
  6. Update any modules that have a Drupal 11 release but were held back earlier by Composer restrictions (for example composer require drupal/google_tag:^2.0).

Once the only remaining warnings are for the Content Lock and Image Widget Crop modules and the LocalGov Drupal profile, the site is ready for the basic upgrade instructions above.