Skip to content

Upgrading from Drupal 10 to 11

Lee edited this page Apr 24, 2025 · 3 revisions

Drupal 11 support is currently an alpha release so these instructions are for testing purposes only. We encourage people to test out the upgrade process and report back how they found it, but it's not ready for production yet.

LocalGov Drupal supports Drupal 11 from release 3.2.0. We're still working on Drupal 11 support for Microsites.

Drupal 10 is supported until the release of Drupal 12, so there's currently no urgency to upgrade your site.

If you're using LocalGov Drupal without many modifications then upgrading should be as easy. If you've lots of additional contrib modules and/or custom code in modules or themes, then upgrading the LocalGov part of the site should be straightforward, but you'll need to go check that all your additional code supports Drupal 11 before you can upgrade.

Along with the instuctions here you should also refer the documentation on drupal.org on how to upgrade from Drupal 10 to Drupal 11.

Upgrade Status

The Upgrade Status module will help determine what needs to be done before you can upgrade to Drupal 11.

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's expected that there will be warning for the Content Lock and Image Widget Crop modules and the LocalGov Drupal profile. These will be updated as part of the upgrade process.

If there are any other errors and warnings then these need to be solved before continuing.

Basic upgrade to Drupal 11 for LocalGov Drupal

To upgrade your site you will be using Composer to update some of the required packages for Drupal 11 support and then updating everything.

composer require localgovdrupal/localgov:^3.2@alpha --update-with-dependencies --no-update
composer require drupal/core-recommended:^11.0 drupal/core-composer-scaffold:^11.0  drupal/core-project-message:^11.0 --update-with-dependencies --no-update
composer require drupal/core-dev:^11.0 brianium/paratest:^7.3 --dev --update-with-dependencies --no-update
composer update
drush updb
drush cr
drush cex

PHP 8.4 support

While the LocalGov Drupal modules are compatible with PHP 8.4, there are still numerous contrib modules that do not have PHP 8.4 support. Therefore, we do not recommend running LocalGov Drupal with PHP 8.4 at this time.

Example upgrade for a more complex site

  • Install all required updates (composer update)
  • Install the Upgrade Status module and check the report at /admin/reports/upgrade-status
  • Ensure you're running PHP 8.3+ and a compatible database servers (e.g. MariaDB 10.6+)
  • Upgrade Drush to version 13 (composer require drush/drush:^13)
  • Update all custom modules and themes to ensure they support Drupal 11
  • Update any modules that have a Drupal 11 release but weren't upgraded earlier due to composer restrictions (e.g. composer require drupal/google_tag:^2.0)
  • Once there are only warnings for the Content Lock and Image Widget Crop modules and the LocalGov Drupal profile the site should be ready for the basic upgrade instructions given above
Clone this wiki locally