Skip to main content

Upgrade to Drupal 10

May 26, 2024
Drupal 10
Introduction

Drupal is a powerful CMS and is significant in content management systems. Keeping updated Drupal core is one of the main things to keep the site secure and also helps deliver a better user experience.

This fix needs a hero!
Why Upgrade to Drupal 10?

As an older version of Drupal, you have equal more risks on your site. To keep updating it’s not just a matter of a new design, it’s more about improving security, performance enhancements, and increasing the functionality of the site in general.

If your site is using Drupal 7, I'd say this isn't even a recommendation, but a very high-priority thing to do. Security support for Drupal 7 ends on January 5, 2025. This is the last extension of Drupal 7's lifetime - Drupal 7 will no longer receive security support after this date.

Benefits

Here is the list of benefits of upgrading your site to Drupal 10, in my opinion:

 

  1. Security Enhancements
    • Drupal 10 incorporates the latest security patches and improvements, helping to protect websites from potential vulnerabilities and cyber threats.
    • With each major release, Drupal strengthens its security measures, providing a more secure platform for website owners and users.
  2. Performance Improvements
    • Drupal 10 includes performance optimizations that can lead to faster page load times and better overall site performance.
    • Enhanced caching mechanisms, streamlined code, and improved database queries contribute to a smoother user experience.
  3. Updated Dependencies
    • Drupal 10 typically updates its underlying dependencies, such as PHP and Symfony components, to ensure compatibility with the latest technologies and standards.
    • This ensures that Drupal websites remain compatible with modern server environments and third-party integrations.
  4. New Features and Functionality
    • Each major Drupal release introduces new features and functionality to enhance website capabilities and user experience.
    • Drupal 10 may include improvements to content management, accessibility features, user interface enhancements, and developer tools.
  5. Long-Term Support
    • Upgrading to Drupal 10 ensures access to long-term support and maintenance, including security updates and bug fixes.
    • Drupal's community-driven development model ensures ongoing support for each major version, typically for several years after its release.
  6. Future-Proofing
    • By staying up-to-date with the latest Drupal version, website owners future-proof their sites and ensure compatibility with upcoming technologies and trends.
    • This reduces the risk of technical debt and the need for costly and time-consuming upgrades in the future.
  7. Community Support and Resources
    • Drupal has a large and active community of developers, contributors, and users who provide support, documentation, and resources.
    • Upgrading to Drupal 10 ensures continued access to community-driven resources, including forums, documentation, and contributed modules and themes.
Drupal 10 requirements
  1. Webserver

    Apache 2.4.7 or higher, Nginx 1.1 or higher, or any other web server with proper PHP support. More details about web server requirements.

  2. Database
    • MySQL 5.7.8 or higher
    • MariaDB 10.3.7 or higher
    • Percona Server 5.7.8 or higher
    • PostgreSQL 12 or higher
    • SQLite 3.26 or higher

    More details about database requirements.

  3. Memory
    • Memory requirements RAM: Minimum required memory is 1GB to make sure Composer works. If you are running multiple modules or using memory-intensive tools such as Solr, or Memcache, considerably more memory may be needed.
    • PHP memory requirements: The minimum required memory size is 64 MB, typically 128 MB or 256 MB are found in production systems. For more, see PHP memory requirements.

    Be aware of the limitations of 32-bit PHP.

  1. PHP

    More details about PHP requirements.

Snoopy
Enjoying the article?

Consider subscribing to our social media.

We much appreciate it.

Upgrade Process

The upgrading process depends on which Drupal version you have on your site. If your site uses Drupal 8 first of all you need to upgrade Drupal to the 9 version and only then to the 10 version.

I used official instructions on the drupal.org for updating:

  1. Drupal 8 to 9 - https://www.drupal.org/docs/upgrading-drupal/drupal-8-and-higher
  2. Drupal 9 to 10 - https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/how-to-upgrade-from-drupal-9-to-drupal-10

 

But if your site uses Drupal 7, then the upgrading process is more complex and requires additional effort. The differences between Drupal 7 and Drupal 10 are significant, as Drupal has undergone several major updates and improvements over the years. 

I won't go into details, but to keep the current functionality of the site, all modules have to be migrated to support Drupal 8 or higher, especially if it’s related to the sites that use custom modules.

Migrating directly from Drupal 7 to Drupal 9 and 10 is now supported with the core Migrate module. The Migrate Drupal module provides the capabilities for importing data from Drupal 6 and 7 to Drupal 9 and 10. Migrate Drupal uses the APIs and underlying capabilities provided by the Migrate module.

Pitfalls

Be ready to be faced with too many problems during the update process. Let me go through several of them which I have had in my experience. 

The instruction said to use the Upgrade Status module to check the compatibility of all modules and themes with the desirable Drupal version (9 or 10).

Upgrade Status

The main goal is to reach 100% compatibility. Quite possibly your site uses contrib modules that are outdated and aren’t supported by the maintainer, and It’s good if these modules have at least automated Drupal 10 compatibility fixes. If not, then you need to create the patch with custom fixes.

With custom modules, it’s a bit easier. Some of the compatibility issues you can fix by Rector and some of them you need to update manually. Rector can save you a lot of manual work by automating code upgrades to Drupal 9, and 10. It’s safe time a lot. That is a good approach to use it.

Once you reach 100% compatibility, be prepared to deal with other issues. The problem is that many of these projects or modules have patches available to make them compatible, but the maintainers still need to commit them. Usually, site owners would download a project and then apply patches to ensure compatibility. However, on https://packages.drupal.org/8, these projects are listed as compatible only with earlier versions of Drupal. This restriction prevents Composer from downloading the project into a codebase with a newer version of Drupal, making the patching process difficult. Therefore, patching alone is not enough. A solution is needed to bypass the version constraints enforced by this remote endpoint. I used Drupal's Lenient Composer Endpoint. The Drupal community introduced a flexible Composer tool that adjusted the drupal/core constraint for packages. This adjustment aimed to remove obstacles in getting extensions installed via Composer to work effectively in transitioning modules to Drupal 9 compatibility. You can find more information on how to use it by following this link on drupal.org.

After updating Drupal all site functionality has to be checked for any errors. From my experience, there are always a few issues after updating, like missing dependencies, permissions, etc.

Conclusion

In conclusion, upgrading to Drupal 10 is crucial for organizations wanting to stay at the cutting edge of digital innovation and keep a secure, efficient web presence. Although the upgrade process might seem challenging initially, the benefits of Drupal 10 far outweigh the difficulties. With better performance, enhanced security features, and a modernized architecture, Drupal 10 allows organizations to provide exceptional digital experiences to their audiences. By following best practices, planning carefully, and using the many resources available from the Drupal community, organizations can successfully complete the upgrade and unlock Drupal 10's full potential. Upgrading to Drupal 10 helps your organization stay agile, competitive, and ready to meet the changing needs of your users. It's better to keep Drupal updated with each release rather than doing it once a year or less often.