Should you make the switch to Drupal 9?

2020 has been a hell of a year and there’s not a ton of things I can point to and be excited about. Drupal 9? That is definitely one of the few. Still, I’m getting a lot of questions from folks currently running Drupal sites: “When should I update to Drupal 9?”

Drupal 9 released on June 3rd, 2020 and represents a significant leap forward in the stability of Drupal as a platform. This is HUGE for the Drupal community, by the way. Previously, even from Drupal 7 to Drupal 8, if you wanted to upgrade you basically had to rebuild your site. Drupal 8 to Drupal 9 is the first major version change where you don’t have to do this. You can “just update” like you would from any other version of Drupal 8! Here’s the catch though: you have to be ready for the update.

The good news: the update to Drupal 9 will be quite painless and VERY easy to do.

The bad news: it will only be painless if you’re ready for the update.

Let’s dig into what that means.



Drupal 8.9.x and Drupal 9.x are “feature identical.” Essentially, this means that any site running Drupal 9.0 will not actually benefit from any cool, new features that don’t exist in Drupal 8.9.x (more on this in a moment). Instead, Drupal 9 will remove all the code in Drupal 8.x that has been marked as deprecated and update underlying dependencies (such as Symfony). The truly “new” features of Drupal 9 will be released later this year when Drupal 9.1 releases (currently slated for December).

So! The quick, dirty, easy answer? Is that you can update to Drupal 9 anytime you won’t, but you won’t directly benefit from it until Drupal 9.1 comes out.

Easy / quick answers aren’t very helpful though, so let’s dig a bit deeper. What might be stopping you from updating to Drupal 9 right now?

Unsupported Modules / Profiles / Themes and Deprecated Code

Marking code as deprecated is a common occurrence in software development. Here’s a quick example from Drupal 8.x. See docroot/core/lib/Drupal/Core/Entity/EntityManager.php.

@deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::clearCachedDefinitions() instead.

If the site in question is running Drupal 8.x, you can continue to use the EntityManager methods despite the code clearly telling you that you should be using EntityTypeManager instead. As soon as you update to Drupal 9.x this entire class goes away.

What does that mean to you?
If you have any custom code (or contrib) that relies on the EntityManager class and/or its methods, your code won’t work and it will immediately begin throwing fatal errors. This is what I mean by “being ready.”

If you want to update to Drupal 9, you have to ensure that:

  • custom code (modules, profiles, themes) has resolved deprecated code

  • contrib code (modules, profiles, themes) has resolved deprecated code

  • all modules / proofiles / themes have been explicitly flagged as supporting Drupal 9

Once you have handled the above three items, you’re ready!

Unfortunately, despite a really significant portion of the contrib space already being ready for Drupal 9, not all of it is. If you are using modules that are flagged as obsolete or unsupported they may never have a stable release for Drupal 9.

Getting Your Site / Platform Ready for Drupal 9

  1. My first recommendation is to get updated to Drupal 8.9.x. This will get you all the newest and greatest features for your site (and should minimize any difference between your site and the Drupal 9 version).

  2. Use the Upgrade Status module to scan you custom and contrib code to see where you are in terms of ability to update. You may be ready right now. You may need to just update a few modules. Or, you may need to really significantly refactor some of your code. The only way to tell, is to run a scan and see.

  3. Carefully evaluate the results of the Upgrade Status scan. If there are obsolete or other unsupported modules that may not get upgraded for Drupal 9, this may require you to rebuild / refactor functionality on your site / platform before you can update.

Testing The Update

I cannot stress this enough! Make sure you test the update before you do it. This should include local (or other non-production) environment updates to test that your site works, database updates apply cleanly, configuration updates cleanly, etc. If you’re already running Drupal 8.9.x, this should be a very safe and quick update (but, it still pays to be safe).

In Conclusion

Drupal 9 is super exciting and you should totally go for it! Just make sure that your codebase is actually ready to go before you do, or you may have some very painful surprises in the form of PHP fatal errors. And remember, as long as you do the upgrade by the time Drupal 9.1 releases, you’re not “actually” going to be missing much (than than a bunch of old, deprecated code that you really shouldn’t be using anyway).