Skip to content

How to migrate from Drupal 7 to Drupal 9 (Part 1)

drupal 7 - 9

Drupal is one of the most used CMS on the web. Although the latest version available is version 9, its version 7 is used by more than 450 thousand sites at the date of publication of this article.


However, according to the latest announcement, this version will be obsolete from November 1st, 2023.


For this reason, it is important to start the migration process from Drupal 7 to Drupal 9 before said date; Otherwise, your site will be exposed to security vulnerabilities and will not have support for the new features that will be implemented both in its core and in the thousands of modules available for this CMS.


You must bear in mind that carrying out this migration basically consists of rewriting your entire website, since version 8 Drupal restructured its code to use symphony and twig; which makes it directly incompatible with the code used in Drupal 7 and earlier versions.


Although it may seem complicated, here is a list of considerations for planning the migration process:


Considerations for a smooth migration


Check the content


This includes reviewing what types of content, taxonomies, views, and more you have on your site. Thus, you can make an inventory of what is going to be migrated and why.


Migration is the ideal time to clean up what you don’t use or isn’t relevant so avoid including this in your inventory.


Check the site features


Make a list of the features that your site has and which ones you want to keep.


This is the perfect opportunity to perform a UX test and get rid of all the problematic or unintuitive features.


Perform module compatibility analysis


Although all base Drupal modules have been updated for Drupal 9, not all community-created modules have.


For this reason, it is important to check which modules you are using on your site have a version for Drupal 8/9. For this, you can use the `migrate` module that comes in the Drupal core and use it to generate the report.


Depending on the state of the module you must:

  • If the module is not versioned for Drupal 8/9, you should look for a replacement
  • If the module does have a version for Drupal 8/9, you should check if the new version has the features you expect. In many cases, the new version was simplified, reducing functionality or was completely reorganized and has totally new functionality.
  • If the module was custom built, it must be rewritten for Drupal 9.


Check the current topic


Drupal 9 uses Twig to render content. For this reason, themes are not compatible between version 7 and 9, so you basically have to re-create your theme from scratch.


It is the perfect opportunity to update the design, use the latest technologies and improve the navigability of the site.


If you don’t have programming experience, you can use one of the themes available on the market or contact a digital ally to advise you on the process.


Learn Composer


Drupal 9 uses composer to manage its internal dependencies. For this reason, it is recommended to also use it to manage external dependencies such as modules, libraries, etc.


All modules supported by Drupal are available via Composer, so you won’t have any problems using them.


drupal 7 - 9


Once you have reviewed the steps above, you can start the migration process; a process that we will review in the next post in this series.


However, for this process we recommend that you have an experienced technological partner since it can be delicate and, if not done well, you can lose information.


We at Swapps have done this process before, we know what could go wrong and how to fix it, and we would be happy to help you through this process.


Contact us for more information.


We walk you through the process.


Related post:

See what’s new on Drupal 8

How to create a slideshow in Drupal 8

What is digital transformation and how to implement it