Keeping 400,000 Drupal Sites in the Family

Two Drupal modules help you move your Drupal 7 site to Drupal 10 but Retrofit is the star.
A worker painting the newly fitted walls with the first coat of colour

Drupal has a really big issue to handle. What do you notice about the graph below?

Graph of Drupal versions in use worldwide

There are 400,000 Drupal 7 sites still operating, and it's just been announced that the last extension to Drupal 7 support will end on January 5, 2025:

That's 14 years that the code will have been supported. True, it likely will still be possible to get extended support from private companies for security support, but how long do you want to run your site when the energy of the community has fully moved on? At the time of this writing, Drupal 10.1 was just released, and that's where are all the new features are appearing.

The jump from Drupal 7 to Drupal 10 is big—really big. The core of Drupal was replaced with Symfony (introducing lots of new and changed APIs), the theming engine was changed, and more. 

The tech industry learned long ago that when a customer is faced with a big upgrade, they are far more likely to take the time to investigate alternatives. Many of them will depart, never to come back. Drupal is robust now, but the impact will certainly be significant if 50% of those sites leave the Drupal community.

Each one of those site owners is faced with a major rewrite if they want to move to Drupal 10. For many of them, a rewrite is the perfect opportunity to bring a fresh design to the face of their organization. It's also true that they can even sidegrade to Backdrop, which has a robust community.

But what if a site owner wants to start taking advantage of the features and future of Drupal 10? What if they want to convert their site gradually instead of all in one go? Is there a way to make their transition easier? As a matter of fact, there is.

Introducing Retrofit

Matt Glaman has begun work on Retrofit, a backward compatibility layer that allows Drupal 10 to run a modified Drupal 7 site. There is still migration work, but it should be much less with this compatibility layer. Site owners can make a small migration to Drupal 10 using Retrofit before the end-of-life of Drupal 7 arrives. After all, some organizations will be unable to set aside a budget for a complete rewrite even by January 2025.

Let's look at the major areas of a site and where Retrofit can help:

  • Drupal Core
  • database structure
  • theming
  • contributed modules
  • custom code

Drupal Core

Drupal's core will come entirely from Drupal 10, which means that it will receive updates and patches just like any other Drupal site. The Retrofit will translate calls to Drupal 7 into calls to Drupal 10, similar to what's happening with the gaming community and the translation layers used there (Proton and Vulkan).

Database Structure

Luckily, the standard database structure is very similar between Drupal 7 core and Drupal 10 core. Moreover, there are robust tools that help migrate the database. Retrofit has no role here, and the upgrade should be relatively straightforward.


Theming radically changed after Drupal 7 when the theming engine changed from PHPTemplate to Twig. It is where Retrofit starts to shine: it will make the PHPTemplate engine available to the site in Drupal 10. Care is still necessary here because PHPTemplate allowed PHP to be used in the template files. Some codes may need to be adjusted. Still, the HTML/CSS and graphic files won't need to change—which will be the theme's main part.

Contributed Modules

By their nature, contributed modules make calls to Drupal core, which Retrofit will translate. They also depend on the Drupal 7 database. If the database structure doesn't change, contributed modules should work with perhaps only a few changes.

Custom Code

In Drupal 7, custom code can live in custom modules, in PHPTemplate files, and even in the database when the PHP module is used. Under Retrofit, calls to Drupal core should translate well but, generally, here is where careful work will be required to ensure the code works as designed.

Making Sure Everything Works

The second module that can help when using Retrofit is the Automated Testing Kit (ATK). ATK is a Drupal-specific set of tests and functions that help a team write automated tests. The tests and functions are available for Cypress and Playwright, two of the most popular tools that are currently revolutionizing end-to-end testing.

ATK is also in its early days, but it will grow as people contribute useful tests and utility functions they've already written for Drupal.

To use ATK for the best effect, start the Retrofit project by writing tests for the existing Drupal 7 site. Depending on the size of the site, between 50 and 500 tests will ensure that each part of the site works. The tests won't only confirm there are no bugs in the existing site. They will also give the team the opportunity to make sure it understands how the site works. 

As the migration progresses, run this test suite as often as needed. If there is a problem, a test will fail, and the team will quickly know where to look. When all the tests pass, the project is complete. As a bonus, now the site has complete end-to-end testing set up to help ensure ongoing quality.


It's still early days for Retrofit. It still needs to be tested against a decently-sized site to find out where it needs more functionality. But it holds great promise for these 400,000 sites that want to stay with Drupal, doesn't currently have the budget to redo their site but still want to head down the road of Drupal 10.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related Organizations

Advertisement Here

Upcoming Events

Advertisement Here