I first started developing with Drupal in 2012, a year after Drupal 7 was released.
However, at the time, I actually started by working with Drupal 6. This was because a majority of companies I was initially contracted to work with were still using Drupal 6, and had no immediate plans to upgrade.
It wasn’t until 2013 that I received my first Drupal 7 project, and ironically this was driven by the client’s eagerness to adopt new technology. That’s right, their eagerness to adopt “new technology” was two years after its release date.
Such is commonly the case with technology, and is an important lesson to be aware of before committing so eagerly to adoption of Drupal 9. Thankfully the migration process from Drupal 8 to Drupal 9 will be far less taxing than that of previous migrations. For instance, the migration process from Drupal 6 to Drupal 7 involved a full site rebuild. Despite Drupal 7 offering a migration module (creatively named “migrate”) to Drupal 8, it too was often executed as a partial site rebuild. While modules from Drupal 7 were developed in Drupal 8, themes needed to be rebuilt using a new templating engine called twig.
Migrations have typically been very expensive, but they won’t be with the Drupal 8 to Drupal 9 upgrade.
The purpose of this blog is to ensure you are aware of the process to most easily prepare for Drupal 9.
With a migration such as the upgrade from Drupal 8 to Drupal 9, there are generally three considerations:
If you can cover all three bases without too much difficulty, it will be incredibly easy to prepare for Drupal 9.
Module Preparation for Drupal 9
Modules, like themes, tend to be either contributed or custom. A contributed module is one that has been provided as open source by the Drupal community. A custom module by comparison is one that has either been purchased from a third party (such as from CodeCanyon), or developed custom for you by a developer.
Ensuring a contributed module is prepared for upgrade from Drupal 8 to Drupal 9 is dependent upon your own resources and expertise. Contributed modules by nature are open source, meaning the Drupal development community is responsible for their upgrade between versions. If you’re not a developer, unfortunately your options here are very limited, as you are at the mercy of the developers of the module, and their eagerness to upgrade the module to be Drupal 9 compatible. It is for this reason that many companies tend to not upgrade to Drupal 9, as they wait for a module’s developer to manage the upgrade first. As a Hail Mary, some larger organisations elect to fund the upgrade of a module to accelerate its upgrade. However, you would need to be fairly reliant upon this module, and be confident there is no existing effort to upgrade the module. As a general rule, you shouldn’t be using modules that aren’t installed by a large number of websites, as it’s generally a sign the module isn’t well supported by the developer community.
If you are a developer, you can either wait for other developers to upgrade the module, or work to upgrade the module yourself. If you are a Drupal developer, contributing to the open source community is something held in a very high regard, and something I actively encourage. However, let’s not sway too far from the purpose of this blog. Should you decide to contribute to a module’s upgrade, checking open issues is a great place to identify whether there is an active effort to upgrade each respective module.
In any case, you should not be upgrading if the modules you use are not all available in Drupal 9.
Custom modules need to be upgraded to Drupal 9 by you or your developer, depending on how it has been developed. If the module was purchased from a marketplace or other third party provider, you are at the mercy of the developer and their eagerness to prepare a Drupal 9 version. If you developed a module yourself (or with your developer), the burden falls upon you to develop a Drupal 9 version. While this may seem tedious, Drupal have announced it will be incredibly easy to migrate from Drupal 8 to Drupal 9 code if your modules have been updating deprecated code throughout Drupal 8’s minor releases (e.g. 8.1 to 8.2).
For your reference, deprecated code is code that has been announced as almost outdated, but not quite yet (and therefore is still functional). The next stage after code becoming deprecated is retiring the code, which means it will no longer function.
Theme Preparation for Drupal 9
Theme preparation for Drupal 9 is thankfully much easier than the equivalent process for modules. If you’ve purchased a theme from a marketplace or third party provider, you are at the mercy of the developer and their eagerness to prepare a Drupal 9 version. If you developed the theme yourself (or with your developer) you will be able to manage this migration. Thankfully, both Drupal 8 and Drupal 9 use the twig templating engine. While Drupal hasn’t released any information pertaining to the changes to themes in Drupal 9, my analysis of Drupal 9’s first alpha suggests the code for a Drupal 8 theme very closely resembles the equivalent in Drupal 9. This would tend to mean the migration effort should be close to effortless, pending the expertise of the developer responsible for the upgrade.
Migrating Data to Drupal 9
We’ve saved the best for last, because the data migration process for Drupal 9 should be effortless. With any data migration between minor Drupal versions (and as Drupal has expressed, this does mimic the minor release process), the upgrade is fairly straightforward for both Drupal Core and its contributed modules. With respect to any custom modules, if data migration is necessary (which it likely won’t be) this will be managed through migration scripts to be executed in the update script. In any case, this isn’t something that should concern you, as Drupal has expressed the migration process very closely resembles that of a minor release, which as we know is a simple process.
Summarising the Migration to Drupal 9
At the time of writing this blog (February 2020) it would be far too early to begin a migration effort to Drupal 9. With such as simple process, if you can keep up to date with the latest minor release, this will best prepare you (according to Drupal’s Founder) for Drupal 9.
If you have queries about Drupal, are seeking guidance through the migration process, or need some assistance in preparing for Drupal 9, you can contact us here.
If you’re still considering which content management system (CMS) to use, you can explore our comparison here.