Drupal 9 came out late last year, and Drupal 8 reaches its end-of-life in November 2021. Nothing strange about this. But did you know that Drupal 7’s life has been extended to November 2022? Due to the high number of active users, it’s in remission and will remain in use longer than Drupal 8. A unique state of affairs in software upgrade paths. Nevertheless, with just over a year to upgrade from 7 to 9, it’s time to make a plan to migrate to Drupal 9.
A little Drupal history
The Drupal community worked hard for nearly five years to produce Drupal 8, finally announcing its arrival in November 2015. Drupal 8 represented a significant transition, described as “… a complete teardown right to the foundation.”
For example, Drupal 8 adopted Symfony 3, a high-performance PHP framework with many reusable components. In addition, it swapped the legacy PHP Template theming language for the more modern Twig, and improved the user experience to make it easier for content creators. Furthermore, with web services in core, creating RESTful APIs is easy and fast. This feature alone is invaluable when connecting with many third-party applications – an area in which BSL specialises.
No gain without pain
Most Drupal APIs were deprecated so that Drupal 8 could evolve into a modern, API-first platform, so thousands of contributed modules needed a rewrite. As a result, some developers simply abandoned support for Drupal. If your site used a deprecated module (and many sites use contributed or custom modules), this left a gaping hole.
Furthermore, while Symphony 3 offered many technical advantages, this proved to be an Achilles heel, as support for Symfony 3 ends in November 2021. After this date, security bugs in Symfony 3 will not get fixed. This dependency has directly led to the premature demise of Drupal 8. The good news is that Drupal 9 uses Symfony 4 (at present, version 4.4), and they now plan to schedule Drupal releases to align with future Symfony releases.
Drupal 7 users reluctant to migrate
Despite all the excellent technical improvements, resistance within the Drupal community was relatively pronounced. Drupal 7 is still in use on around 620,000 live sites (66,4% of all Drupal websites) more than five years after the introduction of Drupal 8.
Which begs the question, “Why is the rate of adoption so slow?”
- Site owners believed that migration from Drupal 7 to Drupal 8 is complex – comparable to adopting an entirely new CMS. While not strictly true, the architecture of Drupal 8 is fundamentally different from previous versions. In addition, as described above, many contributed modules never made the transition, and most custom modules need to be rewritten, adding to migration costs.
- Drupal 7 and Drupal 8 themes are also entirely different. So porting a theme from one to another can’t be automated; You must rebuild each theme from scratch.
- Finally, there has been considerable criticism of the performance of Drupal 8 in comparison with Drupal 7. Justified or not (we can find benchmarks that demonstrate both cases!), it’s a perception that is not easy to shake.
The fact remains, Drupal 8 offers a better, more responsive architecture. All of which makes the cost of ownership of a Drupal 8 site lower than that of earlier versions. Quoting the Borg: “Resistance is futile” 😉
The future is bright, the future is Drupal 9
If your company is still working with Drupal 7, it’s time to create a migration roadmap if you want to offer a modern, secure website from November 2022. Migrating to Drupal 9 will be crucial if you’re going to maintain your site’s functionality. And if you use anything beyond standard Drupal core modules within your site, you should plan the migration as soon as possible!
Your journey is more straightforward if you’ve already migrated from Drupal 6 or 7 to Drupal 8. Drupal 9 will be almost identical to the final Drupal 8 release, minus deprecated code. So when modules take advantage of the latest Drupal 8 APIs and avoid using deprecated code, they will almost certainly work on Drupal 9. So migrating from Drupal 8 to Drupal 9 should be as easy as deploying minor version updates of Drupal 8.
Looking out for gotchas
It’s worth looking at the requirements for Drupal 9 to identify any obstacles. Firstly, Drupal 9 (currently 9.2.6) requires PHP 7.3 or higher, and while that has been the recommendation for some time, it does not yet run everywhere by default. Certainly not on LTS operating systems such as CentOS and Debian.
It’s also worth noting that Drupal 9 requires at least MariaDB 10.3.7 or MySQL 5.7.8, while it is not rare to find much older versions on shared servers. In addition, the version requirement for Apache is now Apache 2.4.7 or higher. So check your servers, or ask your hosting provider before you start. It will save tears later!
Migration tips
For our Drupal 8 sites, we maintain a ‘base project’ which makes it easy to manage the project in git and update dependencies (including Drupal core itself) via the Composer package manager. The advantage is that you only need the custom modules, themes and config files in git, not thousands of core and contributed module files.
It’s worth noting that Drupal 8 initially started with a different base project, so we must convert older sites to a newer project first. The instructions are clear, but it was a bit of a hassle to implement the changes on another server and run the deploy script without causing errors.
Tips for upgrading Drupal core and modules
Drupal 9 is mainly compatible with Drupal 8.9, so you can expect modules to work as-is on both versions. But we recommend that you check the info file for confirmation.
Quite a few module developers took the chance to introduce a new, major version for Drupal 9. Major version jumps always require extra care – especially in combination with a major Drupal core update. Identify such modules as early as possible when planning a migration.
In several cases, there will be dependencies between modules, so we must (for example) follow an exact sequence of removing module A, then upgrading module B, then reinstalling module A. Sometimes there is considerable trial-and-error involved.
If a module is no longer available (and there is no longer a dependency), we sometimes create an empty ‘dummy’ module to allow the upgrade to continue. Without this, Drupal complains that it can’t find the module – blocking the execution of further commands necessary for deployment.
Drupal Expertise
With 25 years of experience in realising websites and custom software, we know many tricks of the trade. Working together with clients, we’ve built many Drupal solutions. We also have unrivalled experience linking Drupal websites to external systems and integrating complex search functions using Solr and Elastic Search. We manage websites in Drupal 7/8/9 and develop in Drupal 8 and 9.
Help with migration
We are happy to talk to companies who want to invest in migrating to a Drupal 9 website, application or platform. We can quickly produce a detailed migration plan that will show the cost/benefits of making the migration. And if you need custom modules, replacing modules that are no longer available in Drupal 9, we can include the cost of rewriting the module, so maintaining your investment. So why not contact our experts to help you begin your transition to Drupal 9?