Watch the recording on YouTube: https://youtu.be/FgbFXYnPUXw
Today we are going to talk about the upgrade (migration) from Drupal 7 to Drupal 8/9. As you probably know by now, there is no clean upgrade path from Drupal 7 to Drupal 8 and you are coming to a point where upgrading is a necessity to keep your website and your business protected. Let's start out with some key dates/information:
- Drupal 7 End of Life: November 2022 (Extended due to COVID-19)
- Drupal 7 Paid Extended Support: November 2025+
- Drupal 8 End of Life: November 2021
- Drupal 9 Released: June 2020
Great, so now that we have that out of the way, lets talk about the migration from Drupal 7 to Drupal 8/9. First, let's tackle the question "Should I migrate to Drupal 8 or Drupal 9?" The answer to this question is: It depends! This is really going to depend on your website and it's unique requirements. The good news is that the upgrade from Drupal 8 to Drupal 9 has a clean path, and does not require a migration.
How do I determine if I should migrate to Drupal 8 or Drupal 9?
With the new upgrade paths between the major versions of Drupal, contrib adoption of Drupal 9 is significantly faster than previous versions. Today, we want to share the questionnaire we use with our clients to help them decide which path to take.
- List out all of the contributed modules you use:
- Is there an equivalent in Drupal 8? Drupal 9?
- If not, is there an alternative that is ready for Drupal 8? Drupal 9?
- Does my current hosting provider support the requirements I have for Drupal 9? Key questions to ask:
- Are you using Solr? Does your provider have Solr 7 Support? The SearchAPI module for Drupal 9 requires it.
- Does your hosting provider support PHP 7.4+? (It should!)
- Does your hosting provider support MySQL 5.7.8+ or MariaDB 10.3+? Drupal 9 requires MariaDB 10.3+ or MySQL/Percona 5.7.8+. There are patches available for the previous version in 9.0 but they will lose support in 9.1.
- If the answer to any of these is "No", are you willing to consider different hosting providers and/or search providers?
As you can see, the biggest factors for the migration path here really depend on your hosting provider/support. Drupal 8 and Drupal 9 are built on the same framework and the only difference
Migration Tools and As-is Migrations
When upgrading from Drupal 7, it is also important to think about improvements to the content authoring experience. Drupal 8 has incorporated some awesome updates into core and content authoring was a key core initiative. Content modeling should be discussed and your team should put together a migration plan before you get started.
Migration tools are awesome and leading up the pack is the Migration module which has a ton of great work to support a Drupal 7 to Drupal 8/9 migration of your data model.
There are tools to migrate your core entity structures such as Content Types, Taxonomies, etc... along with their fields. Support for contrib module upgrades vary, but these can be developed if required. This as-is migration path works great for very simple use cases, but it likely limits your ability to take advantage of new features/content authoring tools built in Drupal 8. For example, if you want to take advantage of Layout Builder for your landing pages, your content model/entity structure is going to need to change pretty dramatically.
Drupal 8/9's core migrate module comes with Drupal 7 source plugins which allow developers to easily connect to Drupal 7's data model and map the content to Drupal 8. Again, contrib results may vary if your using complex fields/child entities and if you have any custom data structures, well, that's going to be a custom migration as well!
It is important to plan your migration path before starting with your migration. We highly recommend a content modeling exercise that maps your current data model in Drupal 7 to a proposed data model in Drupal 8/9. This will not only help gain buy-in from all parties, it will provide a roadmap for your migration and a way to validate it.
Your theme is going to be the area with the least support for automation in your migration from Drupal 7 to Drupal 8/9. The entire theme layer has been rebuilt from the ground up in Drupal 8 to use the Twig framework and there isn't core support for the theme migration. There are several reasons for this:
- Themes are highly customized on every website.
- The default classes/html structure from Drupal 7 to Drupal 8 is different, likely rendering most of your styling unusable without customization.
- The way assets are loaded into the theme layer in Drupal 8 has changed.
While this will add time to your migration efforts, it is likely a good thing to reassess your theme layer and clean up technical debt. This will pay dividends in the future and provide you the opportunity to incorporate newer tools and technologies such as StorybookJS.
Ensuring a Successful Migration
In order to ensure a successful migration from Drupal 7 to Drupal 8/9, automation is required. Whether you are looking to do an as-is migration or a brand refresh, a good automation framework is going to be the difference between smooth sailing and a rocky launch. Some key checklist items to add to your site automation:
- Migration Scripts - Make sure your migration scripts are run early and often.
- URL & Redirect Validation - Make sure you have a way to validate your pages were migrated and/or redirected. This can be done on every migration run.
- Automated Testing (Unit, Behavioral, Visual Regression) - Good practice in any build!
- SEO & Metatag Validation - Don't let your hard work fall apart during the migration. Ensure your migrations include key metadata.
We want to help!
If you are considering a migration from Drupal 7 to Drupal 8/9, we hope you have found this blog to be useful. For those looking to get more information or planning for your Drupal migration, don't forget to watch our recorded webinar: Drupal 7 to Drupal 8/9 Migration.