It's natural to feel overwhelmed when you contemplate all the issues involved in moving your website off of Drupal 7 (D7).
- How much of what I have in D7 will work in Modern Drupal?
- What do I need to keep and how do I keep it?
- What is safe to remove?
- Where do I even begin?
As the old chestnut about how to eat an elephant goes, you do it one bite at a time. This post lists some great tools that will give a bite-sized overview of the current state of your Drupal 7 site and help you decide what you can keep, what you need to get rid of, and what you need to change.
Helpful Modules
The modules we tested include:
- Site Audit
- Unused Modules
- Upgrade Status
- Backdrop Upgrade Status (If you're interested in migrating to Backdrop.)
Take it Step-by-step
The first thing to do is to check that your version of Drupal 7 and its contrib modules are as up-to-date as possible. (At the time of writing, D7 is at version 7.98
.) You should be able to see a list of available updates on your D7 site's admin UI at Reports -> Available updates.
Once your D7 site is as up-to-date as possible, you can install the above modules and run their reports.
Site Audit
First things first, the Drupal 7 Site Audit module is actually not a module! It needs to be installed in your dev environment's .drush
folder, not in your site's codebase. Consult its README to learn how to get its drush
commands working.
Once installed, the Site Audit drush
commands allow you to run reports and output them in various formats, including html
. The screenshot below shows the Summary section of a report and each tag has a percentage score and links you to that section of the report.
As an example, the "Extensions" tag above linked me to the helpful note that "There are 151 extensions enabled; that's higher than the average." This tells me I can probably cull some unnecessary modules before migrating my site.
Reading through the full report will highlight things to keep in mind for your migration; you may well have content fields, content types and taxonomy vocabularies that are unused, so there's no use migrating them! The idea is to get your current site as lean and clean as possible before moving it to a new platform. Proper planning is essential!
The remaining modules featured here are installed like any Drupal 7 module, using either drush en
or by downloading them directly into your codebase and enabling them through your Drupal 7 site's admin UI.
Unused Modules
The unused_modules
report provides a handy list of projects and their modules that are not enabled. (A project can have many modules. For instance, the D7 commerce
project has eleven separate modules in its "modules" subfolder.)
Seeing which modules are not enabled allows you to target them to be uninstalled and removed from the codebase.
Upgrade Status
The Upgrade Status module allows you to check your current D7 site's modules and themes against various versions of Modern Drupal. Simply choose the Modern Drupal version to target (8.9.x
, 9.5.x
, 10.0.x
) and check the upgrade status.
Once the report is finished you get a list of your site's modules and their latest available upgrade versions. It's likely that many of your D7 site's contrib modules (e.g. Views, CKEditor) will have made it into Drupal Core so you'll see messages like "In Drupal core since 8.x". Other modules may have "Replaced by" messages. For example, the D7 Address Field module has been replaced in Modern Drupal by the Address module. Still other modules may have a "No compatible release. Yet(?)" message, which means replacing their functionality may be challenging. (Hint: Now's a good time to decide if you really need that functionality. Remember, lean and clean!)
Backdrop Upgrade Status
For those contemplating Backdrop CMS, the Backdrop Upgrade Status report is very similar to the above Upgrade Status report, except you do not have to specify a version of Modern Drupal to test against.
Assessing your Unsupported D7 Modules
Because of Drupal 7's vast ecosystem of contributed modules, your D7 site likely has modules without compatible Modern Drupal releases. Or, you may well have your very own custom modules that need to be ported to Modern Drupal, or replaced with an existing contrib solution. Depending on the level of specialized functionality you're dealing with, porting these unsupported D7 modules to work in Modern Drupal's architecture could be a daunting task.
As a starting point, the Drupal 7 to 8/9/10 Module Upgrader module provides drush
commands that can analyze and possibly even automatically upgrade that unsupported D7 module to be Modern Drupal compatible!
Unlike the last few modules above, the "Drupal 7 to 8/9/10 Module Upgrader" module needs to be installed on a version of Modern Drupal. (Perhaps use Drupal 9 because at the time of writing, Drupal 10 compatibility has not been committed/released.) The D7 module code to be analyzed needs to be pasted into your Modern Drupal installation's "modules" folder and then you can run drush dmu-analyze MODULE_NAME
to create a report.
Using node_expire as an example:
>drush dmu-analyze node_expire
Indexing...
done.
So, the above output doesn't tell us much, but the actual report is created as an html page called "upgrade-info.html", in the freshly analyzed module's root folder. (E.g. web/modules/node_expire/upgrade-info.html
)
The report points out what changes need to be made in the D7 module to make it compatible with Modern Drupal. For instance, the above screenshot points out that .info files are now .info.yml files
, so using the node_expire
example, the module's node_expire.info
file will need to be updated to be a YAML file called node_expire.info.yml
. The report provides a great starting place to determine a module's readiness for Modern Drupal compatibility.
In Conclusion
The modules highlighted here will not magically make your Drupal 7 site ready for Modern Drupal, but running and analyzing their reports will help turn that elephant-sized Drupal 7 upgrade into actionable, bite-sized pieces. We also provide a detailed outline of how to roadmap your transition off D7 in a recent episode of our D7 End of Life Podcast.
Useful D7 EOL Resources
Relevant resources to support teams faced with the decision of upgrading or migrating from D7:
We're providing real time coverage and consolidating resources and information to support the teams faced with the decision of upgrading or migrating from D7.
Also, check out our Drupal 7 End-of-Life Podcast wherever you get your podcasts.
Roadmap Your Drupal 7 Transition
We’re offering free 45 minute working sessions to help you assess your organizations level of risk, roadmap your transition plan, and identify viable options!
Drop us a note, and we’ll reach out to schedule a time.