Drupal 9 is the next major version of the Drupal content management system (CMS), released on June 3, 2020. Unlike previous major upgrades, Drupal 9 was designed to be an evolution of Drupal 8 rather than a complete overhaul, making the transition from Drupal 8 much smoother. Drupal 9 carries over most of the functionality from Drupal 8, with updated dependencies and the removal of deprecated code.
Key Features and Improvements in Drupal 9
1. Seamless Upgrade from Drupal 8
- No New Features at Launch: Drupal 9 initially launched as a version of Drupal 8 with deprecated code removed and updated third-party libraries. This made upgrading from the latest version of Drupal 8 (8.9.x) relatively straightforward, as there were no significant feature changes.
- Backward Compatibility: Drupal 9 is backward-compatible with Drupal 8, meaning most modules, themes, and configurations should work out of the box, as long as they don’t rely on deprecated code.
2. Updated Dependencies
- Symfony 4 and 5 Support: While Drupal 8 was built on Symfony 3, Drupal 9 updates this to Symfony 4.4 and later to Symfony 5, providing more security, better performance, and modern PHP practices.
- Twig 2: Drupal 9 uses the Twig 2 template engine, improving performance and allowing more flexibility in how templates are handled.
- Database and PHP Requirements: Drupal 9 requires at least PHP 7.3, with support for PHP 7.4 and PHP 8, ensuring better performance and security. MySQL, MariaDB, PostgreSQL, and SQLite remain supported databases.
3. New Features Introduced in Drupal 9.1+
- Olivero Theme: A modern front-end theme designed for accessibility and responsiveness. Olivero is set to become the default theme for Drupal, replacing Bartik.
- Claro Admin Theme: Claro is a refreshed administrative theme offering a cleaner, more user-friendly interface for content editors and site administrators.
- Decoupled/Headless Capabilities: Continued support for API-first architecture, including better integration with JSON:API and GraphQL for building headless applications.
4. Performance and Scalability
- Faster Performance: Drupal 9 continues to improve upon the performance enhancements seen in Drupal 8, with better caching mechanisms, optimized page loads, and support for modern PHP versions (such as PHP 8).
- BigPipe: The BigPipe module is still a core feature, ensuring faster rendering of personalized content by sending static content first.
5. Better API Support and Extensibility
- Updated APIs: With Drupal 9, API support has improved, offering cleaner and more efficient ways to interact with third-party services and applications. Deprecated APIs from Drupal 8 have been removed, allowing developers to use only modern, optimized APIs.
- Decoupled Drupal: Building headless applications is more straightforward thanks to enhanced RESTful API support, JSON:API, and improved GraphQL integration. This makes it easier to use Drupal as a backend while using front-end frameworks like React, Vue.js, or Angular.
6. Cleaner Code Base
- Removal of Deprecated Code: One of the most significant changes in Drupal 9 is the removal of deprecated code from Drupal 8. This creates a more efficient, secure, and future-proof codebase, with less technical debt to maintain.
7. Improved Security
- Drupal has always been known for its security, and Drupal 9 continues to provide strong security mechanisms with regular security updates. The core codebase is streamlined for easier maintenance and patching.
8. Media and Multilingual Enhancements
- Improved Media Handling: Drupal 9 continues the enhancements in media management from Drupal 8, offering more flexible and intuitive ways to manage images, videos, and other files.
- Multilingual Support: Drupal 9 further enhances the already robust multilingual capabilities of Drupal 8, making it even easier to create multilingual websites with streamlined workflows.
9. Contrib Modules and Themes
- Most contributed (contrib) modules and themes that are compatible with the latest version of Drupal 8 will work with Drupal 9, provided they do not use deprecated APIs. The Drupal community worked extensively to ensure the readiness of popular modules for Drupal 9.
Upgrading from Drupal 8 to Drupal 9
The upgrade path from Drupal 8 to Drupal 9 is the easiest of any major Drupal version upgrade:
- Prepare by Removing Deprecated Code: Before upgrading, you need to ensure that all deprecated code has been removed from your custom modules, themes, and contrib modules.
- Use the Upgrade Status Module: This module helps check the compatibility of your site’s modules and code with Drupal 9. It provides insights on what needs to be updated before upgrading.
- Upgrade in Minor Steps: The best approach is to first upgrade your site to the latest version of Drupal 8 (8.9.x) before moving to Drupal 9.
End of Life for Drupal 8 and 9
- Drupal 8 reached its end of life in November 2021, as it relied on Symfony 3, which also reached its end of life.
- Drupal 9 is expected to be supported until November 2023. After that, the community is moving toward Drupal 10, which was released on December 14, 2022.
Why Choose Drupal 9?
- Future-Ready: Since Drupal 9 removes deprecated code and is built with modern PHP standards, it is future-proof and easier to maintain.
- API-First: It remains an excellent choice for headless and decoupled projects, providing robust API capabilities.
- User Experience: Improved themes like Olivero and Claro bring a better user experience for both site visitors and administrators.
- Ease of Upgrade: Unlike previous Drupal versions, upgrading from Drupal 8 to 9 is more streamlined, reducing the effort involved.
Leave a comment