Drupal 8 End of life 2 November 2021. Guide to Drupal 9 upgrade
Discover our ultimate guide to the upgrade to Drupal 9 and protect the security of your websites.
Starting from November 2, 2021, Drupal 8 will go into "End of life" status, meaning it will no longer receive updates, including security updates. This implies that starting from that date, if a flaw in the Content Management System (CMS) is discovered, there will be no remedies from the Drupal community as always happens, and the security of the site could be compromised.
Upgrading to Drupal 9, therefore, is a must in order to keep your site safe from attacks that aim to exploit known vulnerabilities.
The CMS update was necessary because Drupal 8 integrates some components of a framework called Symfony, which in turn will put version 3 of its core into End of life status, and must therefore follow its evolution.
Ironically, Drupal 7, the previous version of the CMS, will go into End of life a year later. Originally, the end of life for Drupal 7 was also set for November 2, 2021, but as today there is still a large number of Drupal 7 sites in production, and as Drupal 7 is not based on any framework that goes into End of life, his life has been extended for one year.
The time required to complete the upgrade from Drupal 8 to Drupal 9 greatly depends on the complexity of each website; for this reason, the Drupal community has released a module to facilitate the operation called "Upgrade status", an indispensable tool from which to start an analysis of the complexities that will have to be faced in the upgrade procedure to Drupal 9.
Thanks to this module, it is possible to immediately have an overview of all the modules used on the websites for which there is or isn't a version for Drupal 9, as well as highlighting other problems and incompatibilities that must be resolved to complete the operation successfully.
Here are some steps that we recommend to follow to complete the upgrade to Drupal 9.
- Create a separate development environment in which to perform the upgrade procedure. The operation will almost certainly cause downtime, so it is best to do it in a separate environment from the production one;
- Check the report generated by the "Upgrade status" module, and resolve all incompatibilities relating to community modules, themes and custom code;
- Install the "Unused modules" module which shows the unused modules. These can be easily eliminated, thus avoiding the waste of precious time;
- Delete all the unused modules by uninstalling them and then remove them with the Composer remove command (if Composer is present in the project);
- Check if the site is still working;
- Update all modules reported as to be updated in upgrade status with Composer update;
- If a certain module does not update it is very likely that the new version is on a new branch. In this case, you have to go to the module site, click on the new version, copy all the words "composer require 'drupal/modname:^x.x" and run the command from the terminal;
- At the end of the module updates, you need to run drush updatedb and install any updates to the db;
- If a version compatible with version 9 has not yet been released for a community module, it will be necessary to check for a corrective patch that can be installed until the port is implemented, if it is not present it will be necessary to uninstall the module and look for an alternative among those that are available and ready for the new version of the CMS.
- It will be possible, for the customized code, to launch the following command "drush us-a" from the shell (and using the cli "Drush") followed by the machine name of the customized module to be analyzed. At the end of the operation, all the lines of the code that are not compatible with the new version of the CMS will be shown, followed by appropriate suggestions to carry out the porting correctly.
- If a version of MariaDB <10.3 has been used, it will be necessary to program the update of this last package in order to have full compatibility with the new version of the Core.
- Finally, upgrade to Drupal 9 by following this guide: https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-later;
Is your site still on Drupal 8 and you haven't started the upgrade to Drupal 9 yet? Or have you started the upgrade but you are having problems? Contact us now, our Drupal developer team will be happy to support you in this operation.