Did you know? Drupal 9 has been available as a stable version since June 3, 2020, already! However, many companies have not yet migrated their sites from Drupal 8 to Drupal 9 – Drupal 8 having continued to benefit from updates until November 2021. However, from that date onwards, only Drupal 9 will benefit from security updates and bug fixes.
If it was a bit hasty to migrate to Drupal 9 a year ago, it’s now necessary to plan this migration quickly.
Why will Drupal stop updating to version 8 in November 2021?
Drupal 9 is not a revolution. Drupal 9’s advances are mainly technical, with updates to the Symfony PHP framework and the Twig template engine. Drupal 8 is based on Symfony 3 and Twig 1, while Drupal 9 is based on Symfony 4 and Twig 2.
On November 21, Symfony 3 will no longer be maintained. Drupal 8’s end-of-support date coincides with that of Symfony 3.
In addition, all Drupal 8 modules are currently being updated to be compatible with Drupal 9.
What’s new in Drupal 9
As previously mentioned, the new features are mainly technical and will provide developers with a solid basis for designing and implementing their own functionalities.
Drupal 9 includes, or will soon include, a number of functional evolutions such as :
- A more advanced media manager with the Media Library module (which will replace the Media Entity module), enabling you to manage images, audio files, documents, videos and remote videos,
- A workflow status manager for publishing content with the Workflow module,
- The appearance of an advanced visual page design tool with the Layout Builder module.
How do I migrate from Drupal 8 to Drupal 9?
Unlike the transition from Drupal 7 to Drupal 8, which required a complete overhaul, the transition from Drupal 8 to Drupal 9 will take place via the usual minor version upgrade mechanism.
However, the following actions must be performed first:
1. Install Drupal 8 Upgrade Status module
This module provides a complete audit of your site in preparation for migration to Drupal 9.
Module installation via composer: composer require drupal/upgrade_status
The audit result is then available on the /admin/reports/upgrade-status page
Actions taken by the module :
- Check version (Drupal 8.8 or 8.9) and suggest upgrading to the latest version,
- Verification of Drupal 9 system requirements in your environment,
- Check the compatibility of installed contributor modules with Drupal 9,
- Run code checks on custom modules to detect Drupal 9 compatibility problems.
Depending on the audit result, the following actions may or may not need to be taken.
2. Perform the latest Drupal 8 updates (see Upgrade Status)
3. Update development, acceptance and production environments (see updates requested by the upgrade status module).
Environment requirements for Drupal 9 :
Nginx version
If you are running Drupal 9 on Nginx, version 0.7.x or later is required.
Apache version
If you are running Drupal 9 on Apache, version 2.4.7 or later is required.
PHP version
Drupal 9 requires at least PHP 7.3. PHP 7.4 is also supported, but is not mandatory. PHP 8 is supported since Drupal 9.1.0.
Database version
If you are using Drupal 9 with :
- MySQL or Percona, version 5.7.8+ is required,
- MariaDB, version 10.3.7+ is required,
- SQLite version 3.26+ is required,
- PostgreSQL version 10 is required with the pg_trgm extension.
Drush version
Drush 10
4. Ensure that the contributor modules used in Drupal 8 are compatible with Drupal 9.
If the upgrade status audit report indicates that the versions of some of the installed modules are not Drupal 9 compatible, look at the recommendation :
- If a Drupal 9-compatible update exists, then update the composer.json file (step 5) with the recommended version,
- If there is no compatible update, then you will need to use another equivalent contributor module or patch the Drupal 8 module to make it compatible.
5. Ensure that any custom developments made for the site (modules, themes, etc.) are Drupal 9 compatible.
Correct incompatibilities identified by the upgrade status audit report.
6. Update versions in composer.json file
If, as part of your Drupal 8 project, you’re using the composer dependency manager, you’ll need to browse the versions entered in the composer.json file and modify them to enable upgrading to Drupal 9 (Drupal 9 core + Drupal 9-compatible module version).
For compatible versions, see the audit report.
Core example:
- For Drupal 8 we have : “drupal/core”: “~8.6”
- For Drupal 9 you need: “drupal/core”: “~9.*”
Once all these actions have been performed, the update will be performed like a regular Drupal 8 update with a composer update.
Focus on D7 to D9 migration
Like the migration from D7 to D8, migration from D7 to D9 will not be easy. A complete overhaul will be necessary In this case, you’ll need to create a completely new Drupal 9 site and attempt to recover Drupal 7 content using the Migrate module.
Today, the majority of Drupal sites are still in Drupal 7 (around 650,000 sites).
To reassure administrators and give them time to migrate, the Drupal community has decided to extend support until November 2022.
One of the reasons for this decision was the significant impact of COVID-19 on company budgets.
Digiwin support on Drupal
Do you have any questions about this article?
Would you like us to help you migrate from D8 to D9 or completely overhaul your site in D7?
Digiwin’s teams are at your disposal. We look forward to hearing from you!