Skip to main content

Drupal 9 Upgrade Processes and Considerations

Reading time: 3 minutes
Glasses in front of a screen with lines of code on it

Upgrading to Drupal 9 requires time and consideration. You have until November 2023 to make the move, but we recommend starting your Drupal migration planning now. In this post, we explain the migration and upgrade process from a technical perspective.

From Drupal 7 and Older

If your site is on Drupal 7 (D7) or an older version, the journey to a Drupal 9 (D9) upgrade is considered the last big migration. With the innovation cycles of Drupal 9 and that of Drupal 8, future major version upgrades will be easy and straightforward.

Our recommended approach is to migrate to Drupal 8 (D8) and continue an easy upgrade to D9 thereafter. Migration to D8 may seem overwhelming as it is not a direct upgrade with the existing codebase. The D8 upgrade is rebuilding a new site and importing your data into it. This is a good opportunity to review and streamline your information architecture and content types.

From Drupal 8 (D8)

Considerations

This is a good chance to streamline your content and SEO and remove ineffective areas. A smaller site is faster and easier to maintain and improve.

Drupal contributed modules development are moving quickly. There could be a better option, or existing module is not actively maintained. With ongoing development, comes technical debt. Audits and reviews should be done to avoid and replace unmaintained contrib modules or themes, and to remove unused modules, themes, and libraries.

D8 and above dictate the environment requirements summarized as follows:

  • PHP 7.3 and above
  • MySQL 5.7, MariaDB 10.3.7, PostgreSQL 10 with the pg_trgm extension, or SQLite 3.26 and above
  • Drush 10
  • Composer 1.9.1
Process
For Non-Composer-Based Install

If your current site is not a composer-based build, it is recommended to convert it to use composer. Composer can be used to manage Drupal and all its third-party dependencies, saving development time in the long run. Continuous updates, dependencies management, semantic versioning, and patch tracking are among the main benefits.

The steps are summarized below:

Continue with composer-based install upgrade process.

For Composer-Based Install

If you are already using composer for your Drupal install base, you may still pick up some useful ideas from the above optimization.

You should update the Drupal core 8 to the latest version. Both contributed modules and themes should be updated as well. A useful list of tools to help you are:

For your custom modules and themes, you want to check for depreciated APIs and fix the incompatible code. Drupal-rector and Upgrade Rector can help automate the process of fixing depreciated Drupal code.

Update core to Drupal 9 and run update.php. CELEBRATE!


Gotchas

If you are on Pantheon platform, avoid these being committed to Pantheon git repository:

  • 'sites/default/files',
  • 'wp-content/uploads',
  • 'web/sites/default/files',
  • 'web/wp-content/uploads'

Webform and libraries are almost always incorrectly installed. Although plugins will be loaded from CDN, the plugins are best local so they can be aggregated to improve performance.


About CK Ng

Chin Kiong "CK" has decades of Drupal development experience and has contributed hundreds of code commits to the Drupal community. He possesses a wild, insatiable talent and drive to solve even the most difficult technical problems in a wide range of technologies, and he brings excellence and elegance in his high-level architectural solutions as well as invaluable direction and advice. He has served as the lead architect for a number of high-profile clients and projects, including The Juilliard School, the University of Minnesota, Cornell, HelpSystems, and Estée Lauder. CK is a full-stack...
Read Full Bio

WHO WE ARE

At O8, a global digital agency based in Minneapolis, MN, USA, we specialize in delivering measurable growth on demand for marketing and sales teams. We pride ourselves on our transparency, agility, and deep technical expertise. In a world that's often stressful and chaotic, we offer experienced, actionable guidance to help you achieve your goals. Our approach is professional, clear, and authentic, ensuring you receive customized, data-driven solutions that drive results.