Drupal 9 was released only yesterday, and users are already being prompted to update. But what does this change mean for you? Is this an update that you need to make immediately? What does it mean for your modules and themes, which were built for Drupal 8?
Do You Need To Update?
The short answer is no. You don’t absolutely NEED to update, but you should. With Drupal planning to release new major versions every 2 – 3 years, by updating sooner you are ensuring saving yourself the hassle down the track. Major releases also tend to be coupled with upgrades to supporting technologies (such as Symphony, CKEditor, and others), and in updating you will have access to the latest iterations of these respective solutions too.
Drupal 8 to Drupal 9 is Simpler Than Previously
Updating from Drupal 8 to 9 is much less tedious than the process of updating from Drupal 7 to Drupal 8. If you updated from Drupal 6 to 7, or from Drupal 7 to 8, you’re undoubtedly scared about the process of updating from Drupal 8 to 9. The demons of my past major release updates have certainly had me put the “guard up”. But not to worry, this shouldn’t be anywhere near as bad as previous releases.
Before proceeding to read the remainder of this article, I recommend you review our previous guide here, which details how you can prepare for this major release.
The Process of Updating to Drupal 9
Below are the key steps I recommend in updating from Drupal 8 to 9.
Step 1: Ensure Your Server is Ready
The first step in this process is to ensure your server will be able to support Drupal 9 upon updating. The requirements as pointed out by Drupal are as follows:
- Apache: Version 2.4.7 or higher.
- PHP: Version 7.3 or higher (but not 8).
- Database (MySQL): Version 5.7.8 or higher.
- Database (MariaDB): Version 10.3.7 or higher.
- Database (SQLite): Version 3.26 or higher.
- Database (PostgreSQL): Version 10 or higher.
Work with your hosting provider to ensure your server is ready for the upgrade per the above specifications before proceeding further.
Step 2: Update to Drupal 8.8 or 8.9
Drupal has recently released versions 8.8 and 8.9, which are the “halfway point” between Drupal 8 and 9. Modules and themes developed for Drupal 8.8 and 8.9 are already compatible with Drupal 9. With previous iterations of Drupal, we needed to wait for Drupal’s contributed modules and themes to be updated for the major release we were updating to. Fortunately, Drupal has created an architecture that permits a more seamless update process.
In other words, if you update Drupal Core to 8.8 or 8.9, as well as all themes and modules, you should have no issues updating to Drupal 9.
Step 3: Use Upgrade Status To Confirm
You may have all contributed modules and themes updated to their latest versions, but this doesn’t necessarily mean the respective modules and themes are built for Drupal 8.8 or 8.9. These two iterations allowed module and theme developers to prepare their code for Drupal 9, but it doesn’t guarantee they replaced deprecated code with the Drupal 9 backwards compatible code. To confirm you won’t have any issues with the update, Drupal released a module called Upgrade Status. This module will analyse your Drupal setup and confirm if there are any genuine concerns you should have before proceeding with the upgrade.
Step 4: Upgrade Your Custom Code
Once all contributed modules and themes have been updated, you then need to update any custom modules or themes you have installed. Drupal 9 is ultimately Drupal 8 with deprecated APIs removed in their entirety. This means code you have in your custom modules and themes that is outdated (and was previously deprecated) will stop working. It’s therefore critical before updating that you first ensure you upgrade custom module and theme code.
Step 5: Update Your Core Codebase and Database
After updating your server and code, it’s now time to proceed with the Drupal 9 upgrade. There are two steps to this:
- Update the Drupal Core codebase by following the steps provided by Drupal here.
- Update the Drupal Core database by navigating to update.php (e.g. example.com/update.php).
What Happens If I Don’t Update?
You may decide not to update, which is completely fine, as Drupal 8.8 and 8.9 will continue to be supported. However, as you can see from the product roadmap below, Drupal 7 and 8 are set to reach their end of life alongside Drupal 9.3, in Q4 of 2021.
Drupal intends to retain each “major version” (such as Drupal 7, 8, and 9) in future for a total of approximately 3 years. Therefore, updating sooner prevents this headache for the imminent future, and aligns you with an update cycle that is intended to be significantly easier to maintain.
If you have any questions regarding the upgrade process, please don’t hesitate to get in touch with us here.