Things to consider:
- Changes to module compatibility (updates to .info.yml file)
- Updating deprecated code
- Using the Upgrade Status module
- Theme changes (changes to Stable and Classy themes)
Upgrading between major Drupal versions has traditionally been troublesome. The upgrade from Drupal 8 to 9 should change this. With the release of Drupal 9 scheduled for June 2010, this post examines what we know so far, what a Drupal 8 to 9 upgrade will look like and what upgrades beyond Drupal 9 might involve.
Drupal upgrades
Upgrades between major versions of Drupal usually involve a lot of work because there are many changes that break past compatibility. compatibility with past code is preserved with minor version upgrades – meaning it's usually safe to install the update knowing it should just work – but major upgrades can change APIs, breaking anything that previously relied on it. The upgrade between Drupal 7 and 8 was particularly painful because Drupal moved away from a hook style of programming to an object oriented style. In doing so it adopted Symfony as the underlying coding framework and moved to the Twig template engine for frontend theming. This means that upgrades to Drupal 8 require a complete rebuild – often an expensive and time consuming process.
The Drupal community has realised that while this breaking of compatibility allows it to staying modern, embracing new trends in web technologies and development, it is off putting for potential users if they need to completely rebuild their website every 5 to 7 years, or whenever their version of Drupal becomes unsupported. Drupal 9 changes this.
At DrupalCon Amsterdam 2019, Dries outlined how easy it will be to upgrade a site from Drupal 8 to Drupal 9. The steps involved are:
- Install and run the Upgrade Status module.
- Update any contributed modules that have been identified as needing to be updated.
- Update any custom coded modules.
- Upgrade Drupal core from 8 to 9.
I'll go through what's involved in each of these steps in the next section, but this is a huge improvement to what was needed to upgrade to Drupal 8. The theme should be compatible with the new Drupal version so there will be no need to completely retheme the site (although there maybe some work to ensure the current theme is compatible - something I discuss further later). The code and API changes between versions will be flagged well in advance, so developers will have plenty of time to update their modules and custom modules should be relatively easy to update. Drupal developers should already be using the Drupal API documentation which clearly flags what will be deprecated in Drupal 9 and what they should be using instead. This means that simple Drupal sites built now should upgrade easily between versions. More complex sites might take longer – depending on the number of contributed modules and how they've been configured – but, in theory, most of the time will be spent testing the changes rather than doing the actual upgrade.
The one caveat to this will be Drupal 8 sites built early after the initial release. These are likely to contain quite a bit of deprecated code and so may take some time to upgrade. But this time will be no where near the same time needed to rebuild them.
An upgrade in practice
The Upgrade Status module provides a list of all the modules used on the site, whether they support Drupal 9 and if not what needs to be done to support it.
...
Further reading
- Dries' blog post on how to prepare for Drupal 9 – https://dri.es/how-to-prepare-for-drupal-9