Drupal 10 Upgrade: A Detailed Guide

Marios Ioannidis
7 min readOct 24, 2023

--

Drupal 10 Upgrade: A Detailed Guide
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 was 1 November 2023, when Symfony 4, the underlying technology framework powering Drupal, also reached its end of life. This will, naturally, have the following consequences:

  • Drupal 9 will stop receiving security updates and as a result, websites still on version 9 of Drupal will not be protected against newly found/reported vulnerabilities.
  • Drupal 9 websites won’t get many new feature additions through their already installed contributed modules and Core.
  • Bug fixes won’t be enthusiastically prioritised for Drupal 9 modules/themes or Drupal 9 Core. Issue queues on Drupal.org for assets on version 9.x will become stagnant compared to the ones for version 10.x (or 11.x and beyond).

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.

Drupal 10 Upgrade: Compatible PHP versions
Drupal 10 Upgrade: Compatible PHP versions

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:

  • Checks if you are using a version of Drupal that supports an upgrade (Drupal 9 does).
  • Checks if your current website meets the next major version’s system requirements.
  • Integrates with Update Status to inform you to update your contributed projects. Projects can be compatible with multiple major Drupal versions, so most projects can be updated on your existing site before doing the core major update.
  • Runs PHPStan checks and a whole set of other checks to find any compatibility issues with the next Drupal major version that may remain (see more details below).
  • Integrates with Drush, Drupal’s powerful command line and scripting interface.

After installing and enabling the module, its main screen will look something like this:

Drupal 10 Upgrade Status module screen
Drupal 10 Upgrade Status module screen

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 ended on 31 December 2023 i.e. shortly after Drupal 9 reached its own end-of-life on 1 November 2023. For new Drupal websites, CKEditor 5 is pre-set as the default editor.

Drupal 10 Upgrade: CKEditor 5
Drupal 10 Upgrade: CKEditor 5

To upgrade CKEditor to version 5 on your existing Drupal 9 website:

  • Install and enable CKEditor 5 — This can(should) be done early in this process.
  • Identify modules (custom or contributed) that integrate with CKEditor 4, for example via custom Plugins. You can install and enable the CKEditor Plugin Report module to view a list of such Plugins on your site.
  • Upgrade related contributed modules to their Drupal 10 and CKEditor 5-compatible versions.
  • For your website’s custom modules, you’ll have to rewrite the incompatible pieces of code and replace them with Drupal 10 and CKEditor 5-compatible logic.
  • Replace “CKEditor 4” with “CKEditor 5” in all your text format profiles (Full HTML, Basic HTML, Restricted HTML and any custom ones present on your site).
  • Test extensively: Create/View/update nodes of various content types and link-building test the CKEditor 5 editing experience including styles and headings, text formatting and link-building tools, media assets’ integration and any other features you commonly employ in your content using CKEditor.
  • Uninstall CKEditor 4, you are done!

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 story in the comments, I appreciate any feedback!

At ORION WEB, we value our clients highly. Contact ORION today to discuss about your web project!

For more content like this, Follow me 🚀

--

--

Marios Ioannidis
Marios Ioannidis

Written by Marios Ioannidis

Leading OrionWeb.uk, a versatile digital consultancy offering expert web development and design services with a strong interest in Local Government.