Drupal 8 to Drupal 9 easy upgrade.

Drupal 8 reached its end-of-life on November 2, 2021. We started upgrading our Drupal 8 sites in October 2021 and by the end of November all our Drupal 8 sites were upgraded to Drupal 9.

It did not feel like we were moving in between major versions, we didn't have to rebuild the sites or any of such. For the sites that used mostly contributed projects and did not have much of custom code, we only needed to upgrade the projects to their latest versions, of which most were Drupal 9 ready and the few that weren't had patches available.

The Upgrade Status module should be the most helpful tool in the upgrade process in our experience. It helped to analyse the site to tell which modules and themes were Drupal 9 ready and which were not. If there existed better compatible versions in Drupal.org, it would tell. The module oversees the process and once it gives green light, the site is D9 ready.

We tried Rector and Upgrade Rector but did not quite get much help from them. Maybe it's our setup or something but they did not help us. We rather relied on Drush to pick out deprecations and fix manually.

The new lenient Composer endpoint also helped to allow us install some Drupal 8 modules which were not yet expressly marked as Drupal 9 compatible, in Drupal 9, and then patch them to work while we wait for them to be Drupal 9 ready. That is installing a Drupal 8-only module inside Drupal 9!

For most of our sites that used mainly contributed projects, we were able to upgrade like three sites in a day but for the sites that used a bit of custom code it took a little longer with some upgrades lasting up to two days.

This picture is not to be compared with that of upgrading from earlier major versions of Drupal like upgrading from Drupal 6 to 7 or Drupal 7 to 8. Those required rebuilding the site and migrating the content as Drupal rewrote itself and made major breaking changes. With Drupal 8, Drupal put an end to this and promised that Drupal 8, which was a sweeping rewrite of Drupal 7, would be the last rewrite of the Drupal codebase.

Now, it is easy upgrades for life!

With Drupal 8, we got a promise of easy upgrades. This means that from Drupal 8 going forward Drupal shall now have backward compatibility layers that would make for an easier experience moving in between minor and major versions. Development of the next version would happen within the current version so when the next version arrives, it shall equal to the latest current version minus deprecated APIs and updated dependencies and libraries. This means that Drupal 9 was developed in Drupal 8 and when 9.0 was released, it was same thing as the latest version 8.9 at the time, only difference in the two was that 9.0 removed all deprecated code in 8.9 and contained updated versions of dependencies like Symfony (updated from 3 to 4), Twig (updated from 1 to 2), jQuery (updated from 3.4.1 to 3.5.1) and so on.

From now all upgrades from Drupal 8 to 9, 9 to 10, 10 to 11 and so on, shall be easy upgrades and projects shall be backwards compatible or better put, can easily be made backwards compatible. Now on drupal.org there are project releases tagged as compatible with Drupal 8, 9 and 10 at the same time. This never happened in Drupal before now.

This means developers can work on projects knowing there would not be major breaking changes that will make them rewrite their code, and Drupal users on the other hand can rest assured they do not have to pay their developers to rewrite their sites in the future as compatibility in between major versions is a question of a few lines of code change to remove deprecations. I think this brings a lot of stability to Drupal. I mean, this makes Drupal future-proof. If you are on Drupal 8, you can easily move to Drupal 9 and move to Drupal 10 when ready without much hassle, and so it shall be going forward!

The new Drupal Release Cycle

Easy upgrades tie into the new Drupal release cycle. One of the changes introduced with the launch of Drupal 8 is to change the Drupal release cycle. Prior to Drupal 8, new features were added to Drupal core only in major version releases. So after Drupal 7 was released in 2011 there has no new features been added to Drupal 7 core ever since. The core team would focus all new features on the next major version, being Drupal 8, and the Drupal community would rely on contrib for new things. Core releases for Drupal 7 and earlier were only security releases and bug fixes and were marked with incremental numbers of the major version like 7.1, 7.2, 7.3 and so on. No new features were added to them. When the new features were finally released in the next major version, backwards compatibility would be broken and upgrades would not be easy at all.

With Drupal 8, Drupal changed this release cycle and adopted a new one alongside adopting semantic versioning that equally supports the new cycle. Now new features are added to Drupal core every 6 months in minor releases while security and patch fixes are released monthly. This allows Drupal to innovate continuously while providing a backwards compatibility layer that makes upgrades smooth and easy.

This is where the easy major version upgrades is coming from. New features are introduced in minor versions and by this some APIs are deprecated but held still on the system to make for backwards compatibility. This keeps happening until the deprecated code becomes too much and then will all be removed and the cleaned copy released as a next major version, with updated dependencies. This means a new major version is similar to the last minor version and to upgrade to it is to use updated APIs and remove deprecated ones. Thus we now have easy upgrades and continuous innovation.

Wrapping it up

We experienced the new easy upgrades upgrading our sites from Drupal 8 to Drupal 9 and we love it. It feels good to know this is how Drupal stays going forward. So the fact that Drupal 10 will be released later this year and Drupal 9 will reach its end-of-life November next year, does not give any cause for concern. Upgrading to Drupal 10 would be a similar experience as we just had upgrading to Drupal 9, and is expected to be even easier as the system is continually refined and improved.

And hey, if you are still stuck with a Drupal 8 build, please don't be, get in touch with us to move your site over to Drupal 9. There are no more security coverage for Drupal 8 and your site might be at risk. Hit us up and let's get your site upgraded. We are one of the most experienced website designers and Drupal experts in Nigeria and Africa, and you can take it to the bank!

Last updated: February 23, 2022