6 Tips for Upgrading to Drupal 10

Why upgrade to Drupal 10? It introduces a range of essential features and advantages, positioning it as an indispensable upgrade for the Drupal platform.

Kyle Regan
5 min readJul 13, 2023

If you haven’t viewed Drupal in a while, Drupal 10 will look much different. It ships with new administrative and front-end themes that modernize the experience, while still being familiar, and it’s more accessible than ever. But perhaps the biggest benefit of upgrading is that it makes your site more compatible with future releases of Drupal, which will likely continue to be built on top of the previous version (read: easier upgrade paths).

An open laptop computer sits on a white table, with the Drupal logo and the version number 10.0 visible on its display screen.

Some changes focus on simplifying setup and configuration. For example, modules that used to be add-ons are now part of the core platform (e.g., the Media Library). In addition, for site builders, there’s a Starterkit for building custom themes quickly and without dependencies on other themes. And third-party dependencies such as CKEditor and Symfony have been upgraded to newer versions offering more functionality and stability.

So, here’s what you need to know to make the upgrade as seamless as possible.

Re-consider the complexity of your site

Known for its flexibility, Drupal boasts a powerful system that can handle a huge amount of content, which can be both a blessing, when you have a lot to say, and a curse, when it comes to making updates. How big a lift the updates will be depends on your site’s size and implementation.

A good rule of thumb is the more “things” (nodes, taxonomies, menus, blocks, views, etc.) you have, the more work will be required to produce an inventory of all the different parts and pieces of a Drupal website. That doesn’t mean you should simplify your site just for the sake of a less arduous update process, but you should have a general idea of the level of effort complexity can add to making updates — and plan accordingly.

Strap in your support

If your site was built years ago and hasn’t been updated, you might be one of the 30% of websites still using PHP 5.6 and lower. PHP 5.6 went end of life over six years ago (January 19, 2017), which means not only is your site vulnerable security-wise, but it also means you’re missing out on the newer version’s enhanced performance — for some tasks more than 40% faster. Consider updating to Drupal 10 as your excuse to join the big leagues.

Dig in

Any time you upgrade a major version, the work involved (development, analysis, testing/QA, etc.) can vary, but there are some common issues that affect the process:

How far behind is the current version from the version being released?

Obviously if you’re still on Drupal 7, getting to Drupal 10 will be a serious endeavor. When the community released Drupal 8, they completely rebuilt the application using new technologies. That means you’ll need to completely rebuild the front-end of your website due to the templating engine replacement that shipped with D8.

If you’re on Drupal 8, somewhat less work is involved since the theming system on 10 vs. 8/9 is the same. And if you’re on Drupal 9, moving to 10 shouldn’t be too bad. However, since the most commonly found version of Drupal is not 9 or even 8, but Drupal 7, Acquia and the Drupal community still provide security updates to D7 even though it’s three versions old and was originally released on January 5, 2011.

What’s the upshot? Basically, staying up-to-date with major/minor versions of a platform will reduce the amount of work required later on.

How much custom code has been written?

Since Drupal 10 was built on Drupal 9 (which in turn was built on Drupal 8), the biggest changes are around the Drupal API’s.

Take advantage of other Drupal and Acquia tools/frameworks

There are several resources that the community provides to help with ongoing upgrade tasks, and you can use them in conjunction with each other for a quicker process.

Upgrade Status automatically checks if your system can run the next Drupal version or if your hosting platform can support it. It’s fairly easy for site builders or developers to use and offers the ability to interact via command line (Drush).

Rector

Drupal Rector automatically upgrades code to be compatible with a targeted version of Drupal by parsing PHP code, running a set of upgrade rules, and saving changes back to a PHP file, otherwise known as a patch, to upgrade the code.

Upgrade Rector allows developers or site builders to visually review each module’s patched code that would be generated by Drupal Rector. After installing both Rector modules (via Composer), you’ll likely need a developer to interpret the results and suggested patches.

Here’s an example: Say you’ve written a custom module that contains code that looks up an entity using the entity manager API on a Drupal 8 website. Depending on the implementation, you may have used Drupal::entityManager(). In Drupal 8 this was deprecated, and it was removed completely in Drupal 9. So if you were to upgrade to Drupal 9, all instances of Drupal::entityManager() would’ve needed to be replaced with Drupal::entityTypeManager() to function correctly with that version

Site Studio is a “low-code” or “no-code” framework that sits on top of Drupal to build and manage pages and content using drag-and-drop components, helpers, and templates. Site Studio does require some training to get up and running (especially if you’re new to Drupal or CSS), but once you get the hang of it, non-developers can start creating and styling components. But please note: your site must be hosted on the Acquia Platform to take advantage of Site Studio.

Even easier upgrading is coming soon

There’s good news on the horizon. Drupal has a couple of initiatives underway to empower end users with out-of-the-box no-code/low-code features added to Drupal Core in the second half of 2023.

Project Browser Initiative is designed to let anyone install modules, including their third-party dependencies, all without having to use Composer on the command line.

Automatic Updates Initiative facilitates updates for Drupal Core. The Automatic Updates Extensions module (a sub-module that ships with Automatic Updates) provides automatic updates for contributed modules and themes.

Both initiatives are available as contributed modules currently, but when they’re finalized, the update process will function more like an “app store,” where anyone can easily discover, install, and update a module and its components.

Need help?

At Adcetera, our digital experts are Drupal cloud certified, with a proven record of technical achievement and years of delivering transformative business experience. If you’re on the Acquia platform, we can help you accelerate the digital transformations of your B2B or B2C website, offering full site design and development, custom component creation, and using the right tools to drive your business engagements.

--

--