Software Development Insights | Daffodil Software

What do you Need to Upgrade from Drupal 9 to Drupal 10?

Written by Tanya Garg | Jan 3, 2023 9:32:00 AM

Drupal is amongst the most popular, open-source content management platforms. It has established itself in the market and has been growing since its launch. Community support for Drupal has made great strides and is always on track to stay up to date with the latest technology integrations. 

Since Drupal 8, Drupal maintainers have adopted a methodical approach to publishing new CMS releases. This is beneficial for anyone who creates, manages, or maintains a Drupal site by providing a clear path for updates from one major release to another. 

The latest version of Drupal, v10 was launched in December 2022. The new version of the web CMS comes with tools to build versatile digital web experiences and that is why there is an increased demand to upgrade to Drupal 10. 

We have prepared a guide for you on how to upgrade from Drupal 8/9 to Drupal 10. It comprises tips on how to prepare for the upgrade, best practices, and how to get started with it. Before we move to the upgrade process, let’s find out what makes moving to Drupal 10 a worthy decision. 

Upgrade to Drupal 10: What’s New in the CMS?


The update to Drupal 10 guarantees automated updates, progressed client encounters, along with other included additions. Also, the latest version has several upgrades in the third-party software associated with Drupal. These components are promised to be more secure, user-friendly, and powerful. Some key upgrades in Drupal 10 are

  • The Claro admin theme (replacing Seven themes).
  • New Olivero default theme (replacing Bartik theme).
  • CKEditor 5 for a better modern editing experience (replacing CKEditor 4).
  • Theme Starter Kit tools for creating more custom themes.
  • Symfony 6 is required (replacing Symfony 4) and PHP 8.1 will be mandatory to keep the system secure.
  • Replacing the jQuery UI with other modern JavaScript components and discontinuing Internet Explorer 11.
  • Improved versions of Layout Builder, and Media Library

Wait, there is a lot more Drupal 10 can do!

Automation technologies can make website improvements more convenient. Developers, for instance, can certify that early upgrades mostly got rid of the deprecated code. The upgrade processes could be automated. This can also be connected to the website hosting provider. You may want, in this case, to invest in a reliable Windows VPS hosting and accelerate the process.

Site developers can immediately search for and install modules in Drupal 10's admin interface. There are a number of pre-installed components, including the Claro theme, Layout Builder, and Media Library. These modules make it simple for web administrators and developers to manage content, utilize the admin interface, and create original page layouts.

For Drupal websites, the front end will always remain the more contemporary Olivero theme. Additionally, the new Drupal 10 will feature new StarterKit theme tools and new procedures for creating custom themes.

Prepare for Drupal Upgrade: 


Before we let you get started with an upgrade to Drupal 10, here are some quick, essential tips to make the move seamless. 

  • If you’re on Drupal 8, make that easy upgrade to Drupal 9 soon (before Drupal 8 EOL)

  • Make sure you have updated to the latest (last released) version of Drupal 9.

  • This will ensure that it supports all the latest released libraries, components, and latest PHP versions (as their older versions will deprecate in Drupal 10)

  • From here, it is going to be an easy ride to Drupal 10 with just a simple core upgrade.

Getting Ready for Drupal 9 to Drupal 10 Upgrade 

 

To get started, maintain the Drupal core up to date and keep track of the modules that are or are not compatible with Drupal 10. Calculate the amount of effort necessary to upgrade to Drupal 10 using the tools at your disposal.

  • The Drupal Upgrade Status module aids in identifying deprecations that need to be fixed. The amount of effort required for the changeover can be estimated.

  • Deprecations are removed automatically with the aid of the Drupal Rector app.

  • The Drupal Check module aids with deprecation detection in static code.

The transition from Drupal 9 to Drupal 10 will be quicker and more automatic. Due to Drupal 9's quicker iterations and fewer minor releases, it will be simple.

For tracking the transition to Drupal 10, there are a few tools that can be of help. For example, the Drupal Upgrade Status module and the Drupal Upgrade Rector module. Let’s figure out the convenience they add to Drupal 9 to the Drupal 10 upgrade. 

Drupal Upgrade Status Module

It is the most important tool required to finish the upgrade successfully. It does every significant task that’s necessary to get you ready for the upgrade. Installing the Upgrade Status module through the Composer package manager is strongly advised because it needs external PHP dependencies.

You'll also need to enable the Git Deploy and Update Manager modules. The Upgrade Status module's user interface is accessible at /admin/reports/upgrade after installation and activation. Your core, contributed, and custom modules and themes will be scanned by the module, and it will let you know which ones contain outdated code.

The drupal Upgrade status module provides you with the interface as shown below:

This provides the information on the system requirements:

1. Drupal core should be at least 9.4.x

2. PHP version should be at least 8.1.0. Before updating to PHP 8, use $ composer why-not PHP 8.1 to check if any projects need updating for compatibility. Also, check custom projects manually.
3. Database JSON support is required.

4. Permissions should be defined in a permissions.yml file or a permission callback.

.

The downloaded report specifies the file in which the issue is found along with the mentioned issue and its cause. It also suggests the removal of the modules that are uninstalled and the ones that are compatible with the required version.

Drupal Upgrade Rector Module

For typical use situations, Drupal Rector ought to be able to handle upgrades, however, for more complicated use cases, code updates can lead to broken functionality. Each Rector regulation contains information about a few of these problematic situations.

Drupal Rector updates a deprecated API used by Drupal as per a set of Rector rules. Since the procedure is automated, adopting this program would save you a tonne of time and work and eliminate any possibility of human oversight. Naturally, there are ambitions for the automated tool's future.

It can be accessed from /admin/reports/Upgrade Rector

Checklist for a Quick Drupal 9 to 10 Upgrade

1. Make sure to update the website's current version.

2. Create a list of the websites' installed libraries and themes. List each of the installed contributed and personal themes for the website.

3. Contributed documents and deployed custom modules on the website. The Upgrade Status module can help with module identification. This module looks through the website, lists the modules that are compatible with Drupal 10, and, if any new versions have been released, proposes updating them. Additionally, Upgrade Status advises uninstalling any deactivated modules.

4. Recognize obsolete code. The deprecations for modules and themes can be found using the Drupal-check module.

5. Update the modules that were donated. Update donated modules to the most recent Drupal 10 version that is compatible.

6. Refresh the custom modules. To be compatible with Drupal 10, custom modules must manually update their code. In the info.yml file, add the core version required key.

7. Update the themes that were contributed. Update submitted themes to Drupal 10's most recent version which is still functional.

8. Any deprecation code must be updated or removed in order for custom themes to be compatible with Drupal 10. In the info.yml file, add the core version required key.

9. Verify that Drupal 10 and the libraries are compatible. Make sure to uninstall any unnecessary modules. Using composer, remove unnecessary modules.

10. Update Drupal 10's core codebase. Once every module, theme, and the library is compatible with Drupal 10, add drupal/core-composer-scaffold, drupal/core-recommended, and composer update while referencing the appropriate Drupal version in composer.json.

That's all, then! Your website's conversion from Drupal 9 to Drupal 10 was successful. Was that not simple?

The easiest way to get ready for Drupal 10 is to keep informed. Now that Drupal has adapted to a flexible update schedule and simpler migration procedures, businesses are less likely to hesitate to make that transition.