Drupal 10 Upgrade: A Detailed Guide
In this post, we are going to present a Drupal 10 upgrade detailed guide (from Drupal 9). Drupal 10 was released on 14 December 2022 and it brings a new era of innovation, features, and enhanced security that cannot be ignored.
If you need a refresher on what Drupal 10 is all about, you can also read the previous editions:
Read on for the Drupal 10 Upgrade Guide:
Drupal 9 End-of-Life
As the digital landscape evolves at an unprecedented pace, it's crucial for website owners to stay ahead of the curve to ensure a seamless user experience and robust security. The end-of-life date for Drupal 9 is 1 November 2023, when Symfony 4, the underlying technology framework powering Drupal, also reaches its end of life. This will, naturally, have the following consequences:
From the above, it's very clear that upgrading to Drupal 10 sooner rather than later is of vital importance for most Drupal 9 website owners. Failing to upgrade can expose your website to vulnerabilities and compromise its performance.
Drupal 10 System Requirements
Drupal 10 uses Symfony 6, which requires PHP 8.1. Requiring PHP 8.1 helps Drupal provide a longer support lifetime for Drupal 10, as well as more stability and predictability in its dependency requirements.
You can find a detailed overview of the Drupal 10 requirements on the corresponding Drupal.org page , and below, we are presenting the most important changes that you should take into consideration for your website's upgrade to Drupal 10.
At the time of writing, hosting providers should support PHP 8.1 (and above) by default and the days of PHP 7.4 are long gone. Having said that, if your website is stuck to an old PHP version (and your hosting provider still supports it), it's still important to upgrade both as older PHP versions are prone to security vulnerabilities.
The minimum required PHP memory size is 64 MB, typically 128 MB or 256 MB are found in production systems. For more, see PHP memory requirements .
The minimum required RAM memory is 1GB to make sure Composer works. If you are running multiple modules or using memory-intensive tools such as Solr , or Memcache , considerably more memory may be needed.
You can read more about the minimum suggested requirements for the web server and database on the following pages:
Upgrading to the latest 9.x version
We recommend upgrading your site's Core to the latest 9.x version first. At the time of writing this post, the latest 9.x version is 9.5.11. Your site's contributed modules and other contributed dependencies (e.g. themes and profiles) should also be updated to their latest Drupal 9 versions. This will ensure that the path towards Drupal 10 will be as short (and smooth) as possible.
If you're comfortable with the Terminal, you can also use Composer to get a list of dependencies incompatible with Drupal 10:
composer why-not drupal/core ^10
You can read more about using Composer to handle dependencies on a Drupal project here .
Read on for an essential, no-code module that you can use to organise your Drupal 10 upgrade path.
Upgrade Status Module
The Upgrade Status module:
After installing and enabling the module, its main screen will look something like this:
As you can see in the screenshot above, the module provides plenty of information broken down into meaningful sections, mainly based on the nature of the work required to upgrade the assets in each group:
Modules and Themes
1. Upgrade to the latest 9.x version
As mentioned above, contributed modules and themes should be brought as close to the latest 9.x version of Core as possible on your website. For small custom modules, this should usually be easier because their dependencies and versioning declarations are, most of the time, less complex than those of most contributed modules.
2. Remove unused assets
Disabled modules should ideally be uninstalled and removed from your codebase unless you're planning to use them. It's better to get rid of unused modules than update them and keep them "asleep" in your codebase!
3. Fix deprecations
Some of your site's modules/themes might only require replacing deprecated pieces of code with Drupal 10-compatible logic. Rector, an automated tool for batch-fixing such issues, can be extremely useful in some cases. The Upgrade Status module will do its best to flag opportunities for automated fixes. Needless to say, it is still your responsibility to thoroughly review the code changes applied as well as test any related features and functionality extensively.
4. Replace dependencies
You might also be using Stable Theme and/or Seven Theme in your installation, either in a standalone manner or as base themes for custom themes on your site. Both of these themes have been removed from Core on version 10. This means that, before upgrading your Core to version 10, any dependencies to these Core themes will have to be replaced with their contributed module equivalents.
5. Research-explore alternatives, if needed
Some modules/themes might not yet have a solid upgrade path. In this case, alternative solutions should be explored such as applying patches (make sure you dig into the issue queue for these modules to find the latest information posted by other Drupal community members facing similar issues).
Some modules might be flagged by the Upgrade Status module with a message including the phrase: "Work with the maintainer to...". In this case, you'll probably need to do some detective work on the module's issue queue. For most websites, this section should not contain too many modules.
In some instances, alternative options could also provide the same/similar functionality for your website (on most project pages on Drupal.org you'll find a "similar modules" section).
6. CKEditor 5
CKEditor was added to Drupal Core in version 8. It's been a very stable project but support for it ends on 31 December 2023 i.e. a few months after Drupal 9 reaches its own end-of-life on 1 November 2023. For new Drupal websites, CKEditor 5 is pre-set as the default editor.
To upgrade CKEditor to version 5 on your existing Drupal 9 website:
7. The... green section!
Finally, some of the items listed on the Upgrade Status screen will be immediately Drupal 10-compatible. In this case, the fix is easy and quick: You simply need to upgrade the module to its latest stable version and no code changes should be required.
8. Uninstall and clean up, if required
After completing the upgrade process, you might end up with modules that can be completely removed, for example, Upgrade Status or CKEditor Plugin Report. Make sure you've removed these from your codebase in order to make it as light as possible.
Conclusion
Following these steps, you should hopefully end up with a fully functional Drupal 10 website.
Not all Drupal websites are the same and sometimes complications arise. The Drupal community is extremely active and, most of the time, a problem you're facing with a module has already been captured on the project's issue queue. If not, don't hesitate to open an issue yourself .
Let me know what you think of my Drupal 10 upgrade guide, I appreciate any feedback!
For more content like this, subscribe to my newsletter .