Skip to content

Upgrading from Drupal 8 to 9

Stephen Cox edited this page May 19, 2021 · 1 revision

The Drupal 8 to 9 upgrade involves moving from LocalGov version 1.x to 2.x.

If you're using LocalGov Drupal without many modifications then upgrading should be as easy. If you've lots of contrib modules 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 9 before you can upgrade.

Basic LocalGov Drupal 9 upgrade

The basic steps to upgrading to Drupal 9 involve installing the required LocalGov 2.x and Drupal 9 packages using Composer and then running the Drupal database upgrades.

This will go something like:

composer require localgovdrupal/localgov:2.x-dev --update-with-dependencies --no-update
composer require drupal/core-recommended:^9.1 drupal/core-composer-scaffold:^9.1 drupal/core-project-message:^9.1 --update-with-dependencies --no-update
composer require drupal/core-dev:^9.1 --dev --update-with-dependencies --no-update
composer update
drush updatedb

Upgrades for more complicated LocalGov based sites

If your site has extra contrib modules and custom code then you'll need to evaluate these for Drupal 9 compatibility before upgrading.

The drupal.org site provides lots of documentation on how to use the Upgrade Status module to check whether your site is ready to be upgraded to Drupal 9 and, if not, what needs to be done to fix it.

When using the Upgrade Status module to evaluate the status of contrib modules be aware that the Devel, Recurring Dates Field and Date Recur Modular Widget Framework modules will be upgraded as part of the LocalGov upgrade and so warnings about these can be ignored.