Upgrading from Drupal 8 to Drupal 9 might sound intimidating, but it’s a crucial and entirely manageable step forward for the security, performance, and long-term stability of your website. Now that Drupal 8 has officially reached its end of life, the clock is ticking for those still running their sites on outdated software.
This article will walk you through the most critical steps, best practices, and gotchas that we’ve uncovered while upgrading several Drupal sites to version 9. Whether you’re a solo webmaster or managing multiple client platforms, these insights will help you make the transition smoothly.
Why Updating to Drupal 9 Is Non-Negotiable
Drupal 8 is no longer receiving security updates, which puts your site at risk. The longer you wait to upgrade, the harder—and more costly—it becomes to maintain or restore your platform if something breaks or gets compromised. Drupal 9, in contrast, is actively supported, offers backward compatibility, and paves the way for future-ready enhancements like Drupal 10.
So yes, updating to Drupal 9 is no longer optional—it’s urgent.
Check Your Hosting Environment Compatibility
Before diving into code, pause and check your hosting provider’s tech specs. Drupal 9 comes with stricter minimum requirements:
- PHP version 7.3 or higher
- MySQL 5.7.8+ or MariaDB 10.3.7+
- Symfony 4.4 or later
- Composer 2
- Drush 10+
In one upgrade we performed, the host did not support the required database version. A simple support ticket resolved it, but that delay could have been avoided with a pre-check.
Backup Everything – Twice
It’s a golden rule in any major CMS migration: backup everything. We recommend the following:
• Full file system backup (including /sites)
• Database dump
• Backup your Composer files and configuration exports
Also, create a staging environment that is completely isolated from production resources—don’t risk cross-contamination from shared databases or file directories.
Update All Contributed Modules and Themes
Before switching over to Drupal 9, bring all your modules and themes up to their latest Drupal 8-compatible versions. Many maintainers have already ensured D9 compatibility, so upgrading within D8 first will make the next jump easier.
Use the Upgrade Status module to scan your site and get detailed compatibility reports.
Run drupal-check on Custom Code
Custom modules and themes are the most likely to hold you back. Drupal 9 drops support for deprecated APIs that were allowed in Drupal 8. Use the command-line tool drupal-check to scan your custom codebase and flag deprecated usage.
Some common fixes include:
• Replace EntityManager with EntityTypeManager
• Fix old route callbacks
• Update *.info.yml files for compatibility
Update *.info.yml Files for Custom Modules and Themes
For Drupal 9, every custom module and theme must have this line in their .info.yml file:
core_version_requirement: ^8 || ^9
That exact syntax is crucial. Missing or incorrect formatting here will cause update.php to choke.
Remove Deprecated or Unused Modules
Some modules have been deprecated in favor of core functionality or newer alternatives. For example:
• Kint (from older versions of Devel) should be removed
• Swift Mailer is deprecated – use Symfony Mailer instead
Be cautious, though. Sometimes, even deleted modules leave behind database traces. We’ll cover that next.
Workaround for “Missing or Invalid Module” Errors
If update.php throws an error for a module you’ve already removed (like kint), here’s a handy workaround:
1. Recreate the missing module folder under /modules/
2. Add a dummy MODULE_NAME.info.yml file like this:
name: 'Kint'
description: 'Temporary placeholder'
type: module
version: '1.0'
core: 8.x
core_version_requirement: ^8 || ^9
3. Re-run update.php
4. After successful updates, remove the directory
This trick has saved our bacon on more than one occasion!
Composer Update Tips for Updating to Drupal 9
Most Drupal 9 sites are now Composer-based. Here’s a streamlined Composer approach:
composer require 'drupal/core-recommended:^9' --update-with-dependencies
composer require 'drupal/core-composer-scaffold:^9'
composer require 'drupal/core-project-message:^9'
Make sure to run composer update afterward and clear your cache (drush cr or drupal cache:rebuild).
Final Checks Before You Go Live
Before flipping the switch, double-check:
• All modules are enabled and compatible
• No critical PHP errors in logs
• Content types and views behave as expected
• Caching layers (Varnish, Redis, etc.) are working properly
• HTTPS and SEO-friendly URLs are still intact
Use automated testing tools, manual QA, and browser-based spot-checking to validate everything.
Common Questions About Updating to Drupal 9
Is Drupal 9 backward compatible with Drupal 8?
Yes, mostly. Drupal 9 is built on the same core as Drupal 8.9 but with deprecated code removed.
What happens if I don’t upgrade from Drupal 8?
Your site will become insecure over time, and module maintainers will stop offering updates.
Can I jump from Drupal 7 to 9 directly?
Not easily. You’ll need to rebuild or use tools like the [Migrate API] for a clean migration.
How long does the Drupal 9 upgrade process take?
That depends on the complexity of your site. For small to medium-sized sites, a few days is realistic.
Do I need to rewrite my custom themes?
Not necessarily. Most require only minor updates to remove deprecated code and update .info.yml.
Should I go straight to Drupal 10 instead?
Drupal 10 is great, but upgrading to 9 is the smoother transition if you’re already on Drupal 8.
Updating to Drupal 9 is Easier Than You Think
With a clear checklist, proper backups, and patience, updating to Drupal 9 becomes an achievable goal rather than a dreaded chore. Security, stability, and forward-compatibility await you on the other side.
So, gather your team, spin up a dev environment, and get started today. The longer you wait, the harder it gets.