So long Drupal 7 (and now 8), welcome Drupal 9
Updated September 2020.
Drupal 7 was released back in 2011. Having served the Drupal Community and its users for more than eight years, it was due to reach end-of-life (EOL) in November 2021. This end-of-life date has since been extended to November 28, 2022. This is to help those businesses affected by the Covid-19 pandemic.
Meanwhile, Drupal 9 was released on the 3 June 2020, and with it comes the Drupal 8 EOL in November 2021 (due to Symfony 3’s EOL). However, since the upgrade path from Drupal 8 to Drupal 9 is much easier, Drupal doesn’t anticipate the same impact on end-users.
What does Drupal EOL mean for websites owners?
Put simply, if you haven’t moved to Drupal 8, you need to start thinking about Drupal 9!
With Drupal 8 being a ground-up rebuild of the platform, getting to Drupal 9 requires significant work. You’ll have to migrate your content, as well as your code, your themes, and your templates.
Plenty of documentation exists around this as lots of companies and organisations have already gone through the migration. This blog post has quite a few links and tips to help you get started.
Let’s begin by mentioning that Drupal 8 (and Drupal 9) ships with a migration framework out of the box. This means migrating your content from previous versions – as well as other systems – is an easy (and often) non-technical job.
Your code is also covered. This is because the community has created a dedicated page for “Converting Drupal 7 modules to Drupal 8” which addresses all common scenarios and issues. Plus, we have a few more links and tips to share with you to make a painless Drupal 6/ Drupal 7 to Drupal 8 transition.
We’ve just moved to Drupal 8, do we have to do it all again for Drupal 9?
The Drupal community has decided to stop breaking websites after each major version by adopting more granular release processes and policies.
For this reason, Drupal 9 code will be exactly like the last minor version of Drupal 8 – stripped of all deprecated code.
This means if you follow Drupal best practices and don’t use deprecated code on Drupal 8, your website may require zero development time. The same should be true for all of the following major version updates.
What does it mean for module, profile and theme maintainers?
Either you have a module (or profile, or theme) hosted in Drupal.org, or you have built custom ones for your organisation. You need to check if your code is compatible with Drupal 9, otherwise people will stop using it when they migrate. Keep reading to see some tips on how to make this an easy task.
OK, I’m excited! Tell me more
Below you will find some scenarios and best practice suggestions for site and module owners. If you need more info, please don’t hesitate to get in touch with us.
… on Drupal 6
Well, you are quite behind. We strongly suggest a direct move to Drupal 8 as soon as you can. Although we said 8-to-9 will be straight forward, Drupal 8 includes migration facilitations for Drupal 6 which probably won’t be included in Drupal 9. There is the possibility that these might be available as contrib modules, but it’s better to be safe than sorry, and start moving now!
…on Drupal 7
When we originally wrote this blog post, there was about two and a half years to migrate to either Drupal 8 or Drupal 9. However, now that Drupal 9 has been released, you can upgrade directly from Drupal 7 to Drupal 9. In many cases, this is the best upgrade option, as it assures your upgraded site has maximum expected life.
Alternatively, you can upgrade to Drupal 8 first and then migrate to Drupal 9. You might choose this route if your site requires functionality provided by modules only available in Drupal 8 and not yet in a Drupal 9 compatible release.
With the EOL date pushed back, you now have longer to achieve this. We’ve already shared some links to help you migrate your code and content, but you may also find the Drupal Module Upgrader module useful.
If moving to Drupal 9 (or Drupal 8) is really impossible for your website, there is another possibility to stay on Drupal 7 by using one of the approved Long Term Support providers. There may be additional fees to stay on these programmes (and it’s not something we would advise as best practice), but it worked very well with Drupal 6. Check this out to know more and stay up-to-date.
…on Drupal 8
Well done! If you are already on Drupal 8, either because you’ve migrated or built your website directly with this version. You’ll be glad to know you may be ready to move to the next major version with zero effort!
As the big difference between the last Drupal 8 release and the first Drupal 9 release is removing deprecated code, you only need to check your modules, themes and profiles don’t contain deprecated code. So, there’s no need to worry about migrating your content at all!
And don’t worry about the code either, as the community has already created some tools and practices to facilitate this work.
Upgrade Status is probably your best companion. The module will scan your custom themes and modules, as well as your hosting environment, and report any compatibility issue with Drupal 9. The report integrates with Drupal.org “Deprecated” and Change Records, providing guidelines for how to address the issue.
The deprecation messages on the Upgrade Status report always try to point you in the right direction with helpful suggestions to become compatible.
Take, for example, this deprecation error after scanning Chatbot API with Upgrade Status:
“\Drupal\Component\Utility\Unicode::strtolower() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use mb_strtolower() instead. See https://www.drupal.org/node/2850048.”
It says exactly what’s going on, and the link also explains the issue even further and the reason for the change, as well as giving you some examples. I just need to open the file from the report and replace “Unicode::strtolower” instances with “mb_strtolower”.
Sounds good – but I might need some support!
Depending on which scenario relates best to your organisation, you may require a helping hand to get you on track to moving to Drupal 9. We’ve compiled a list of useful links for you to check out, and as always, our Drupal experts are here to advise you. So get in touch with us to support your team with these changes.
- Dries on Drupal 7, 8 and 9 plans
- Dries about the Plan to release Drupal 9
- Requirements before opening 9.x branch
- Help contributed modules prepare for Drupal 9
- Gábor Hojtsy about helping contrib modules to be Drupal 9-friendly
- Video podcast with Dries and Gábor about Drupal 7, 8 and 9 migration tasks
- Thanks for making a difference at Drupal 9 Porting Weekend!