Introduction
The Open Source CMS, Drupal, is approaching its 20th birthday and has evolved significantly over the years. When Drupal 8 was introduced in 2015, the migration process wasn't easy. Upgrading was as complex as building a site from scratch, and migrating content added another layer of complexity. These challenges raised concerns for developers and businesses about the launch of Drupal 9. Fortunately, managing upgrades will be easier in the future. This means that migrating from Drupal 7 to Drupal 9 will be similar in effort to migrating from Drupal 7 to Drupal 8. This shift promises a more stable update process and manageable development. But what's the hype around Drupal 9, and why should you consider upgrading? Let’s find out!
What Is Drupal 9?
Drupal 9 is essentially Drupal 8.9 with deprecated code removed. It remains familiar to everyone, including editors, site builders, and developers. Drupal 8.8.0 was the last release to deprecate code for Drupal 9. Developed with an API-first approach, Drupal 9 offers structural tools to define editorial workflows.
Why Was The Code Deprecated?
Deprecating code during Drupal 8's development allowed issues to be worked out even before Drupal 9's release. It avoided the need for extensive refactoring, simplifying the migration process. However, migrating from Drupal 7 to Drupal 9 can still be a significant task for sites running different versions of Drupal.
Why Upgrade To Drupal 9?
The big questions are whether it's time to consider Drupal again and how urgent this migration is. Drupal 8.9, the final version of Drupal 8, will receive bug fixes and security coverage only until November 2021. Drupal 9's development and security updates will continue beyond that timeline. This means you can stick with Drupal 8.9 until the end of 2021. However, it's important to note that Drupal 9 is ideal for sites looking for forward compatibility with later releases. While not all Drupal 8 code is compatible with Drupal 9, it offers an excellent opportunity for businesses considering a migration from other CMSs to leverage Drupal 9's features.
How To Prepare For Drupal 9 Upgrade?
Primarily, check the status of your favorite contributed modules if they are Drupal 9 compatible or not because eventually, you would want your site to be migrated to Drupal 9. For more, below is the checklist to begin with the upgrade process. Drupal 9 Update Checklist Before diving into the migration process, it's essential to ensure that your favorite contributed modules are Drupal 9 compatible. Here's a checklist to help you get started: Ensure your site is up to the latest minor version, Drupal 8.9. Upgrades aren't supported beyond Drupal 8.8. Upgrade to the newest PHP requirements, PHP 7.3+. Deprecate code on your site and fix it if necessary with the help of the Upgrade Status module. Determine whether your site is based on Composer or tarballs, as this affects the upgrade process. Tools & Modules For Upgrading To assist you in the upgrade process, consider using the following tools and modules: Core Migrate Module Suite: For migrating your content and site configuration. Upgrade Status Module: Provides information about the availability of contributed projects. Upgrade Rector: Automates module updates for Drupal 8 sites with common deprecated code to the latest Drupal 9-compatible code. Drupal Module Upgrader: Scans and converts outdated code on your Drupal 7 site.
Drupal 7 To Drupal 9 Migration - The Big Leap
In one of our earlier blogs Picking The Right Drupal Migration Strategy, we discussed what are the different migration approaches and how this is a good chance to refactor the content structure. In this blog, we will see practical examples of the above steps in a way that would not be overwhelming for all the stakeholders.
Handling The Content types, Taxonomy And Modules First
Considered as the building block in structured authoring in Drupal, a content type primarily consists of two important elements.
Content type base configuration:
In a content type, the base configuration defines the default behavior and properties of the content type while they permit the creation of a set of fields that are associated together in a meaningful way.
Taxonomy in Drupal:
It is a powerful core module that allows one to connect, relate, and classify the website’s content. Thus, the practice of classifying content i.e. Taxonomy can be used in workflow which will further customize a particular or defined sections of the website with various themes.
Content Types
We have highlighted the importance of handling the content when doing a migration in our earlier blogs Performing Drupal 9 Content Migration.
To understand the content on our site better, it helps to look at the content with a fresh perspective. One of the ways in which it can be done is by categorizing the available content types. Some of the options are mentioned below.
- Rely on the body field as a primary source of information.
- Rich in fields with different data types.
Categorization such as above can help us optimize the target site. For example:
- Merging content types that rely on body field into a basic page with a mapping field to Drupal 7 content type.
- We also need to decide which content types are not used and avoid them.
Each content type can be documented through the following:
- Field level requirements.
- Content Retention policy (what to migrate and what not?).
- What are the aggregate pages for the content type and type of filtering required?
- What does the content view page look like and what should be displayed?
- Migration considerations specific to content type and assumptions made.
A migration like this is also a good time to revisit the taxonomies, number of users, and roles used in the site and add/remove items as needed.
Modules
This is the area where we need to be careful not to assume that everything is needed in the new site. During a Drupal Development site, it is natural for a lot of modules to be added but not used.
We recommend classifying the modules based on MoSCoW rules of prioritization.
Required Modules (Must-Haves and Should-Haves)
The ones that fall under this category are mentioned below.
- Core modules in Drupal 7 and contributed modules in Drupal 7 which are now in Drupal 9 core.
- Contributed modules in Drupal 7 which are actively used by administrators and editors. Examples include performance modules like memcache, basic utility modules like admin menu, XML sitemap, etc.
Optional Modules (Could-Haves)
Modules that are used in Drupal 7 but are not needed in the initial phases of the site and can be included only if needed (like Features, Rules, and Panels), fall in this category. It is because a lot can be achieved with Drupal 9 which was only possible via a contributed module in Drupal 7.
It is important to validate the need for each module (contributed and custom). Besides this, try to have only the minimal modules in Drupal 9 as it eases the maintenance of the site during the longer run.
Bringing Roles and Content Workflow Together
Ensuring seamless collaboration between roles and content workflow is essential. Here are the suggested steps:
- Validate existing roles and redefine them based on user actions.
- Employ combinations of roles for users to replicate their actions from the Drupal 7 site.
- Utilize the Permissions by Term module if access to site content is categorized.
- Eliminate duplicate or unnecessary permissions.
- If decentralization of site control is required, consider implementing the Group module.
- Verify active users and migrate only those necessary.
- For a small user base, manual role mapping is preferable to automated migration scripts due to its one-time nature.
Regarding content workflow:
- Clearly define content moderation states for each role.
- For sites with straightforward workflows, Drupal core’s Content Moderation module suffices.
- Sites using the Workflow module in Drupal 7 can seamlessly transition to Drupal 9, leveraging the same module with an upgrade path.
- For sites necessitating a workflow dashboard and email notifications, the Workbench suite with Workbench, Workbench Moderation, and Workbench Email offers comprehensive solutions.
How are we going to manage the media?
The management of media in your Drupal migration depends on various factors:
- Is the media in the Drupal 7 site restricted to a specific type like only images and video, or is it diverse enough, including files, audio scripts, and other custom media types specific to the site?
- What is the future scope of media in the Drupal 9 site? Are you expecting the site to be media-rich with lots of metadata?
- Do you need the same field to store different types of files?
Based on the above considerations, you can decide how to manage media. One option is to use simple image and video fields to store the media. Alternatively, you can leverage the media module in Drupal core, which allows storing different types of files in the same field. Additionally, custom media types can be created with metadata.
It’s worth noting that while the community has considered integrating media as part of the default Drupal installation, simple file fields are unlikely to disappear from the core in the foreseeable future. However, if you choose to use media, you're in good company.
Supporting modules are available depending on the path you choose:
- For a simple image/video/file field path, you can use the File Entity Browser to browse files.
- For the media field in Drupal core, you can organize media with the Media Directories module. The Bulk Upload module allows uploading a large number of files at once.
NOTE: The Media Directories module provides only virtual directories and does not physically map to actual directories in the file system. Work is in progress for this feature. Additionally, efforts are underway to support drag and drop for the media library.
How Does This Affect My Site?
As indicated in the list above, the migration process for Drupal 7 and Drupal 8 versions will differ. Therefore, it's important to understand how this will affect sites at different versions of Drupal. Let's break it down:
If Your Site Is In Drupal 8
The migration from Drupal 8 to 9 is akin to upgrading minor versions within Drupal 8. If your site is currently at Drupal 8.9, you can consider pausing and bypassing the upgrade hassle for now.
However, it's crucial to note that some permissions and modules are not supported in Drupal 8.9 and require an upgrade to Drupal 9. Make sure to check if your favorite contributed modules and features are supported.
For detailed information on upgrading your Drupal 8 site, you can refer to this video!
If Your Site Is In Drupal 7
For long-term owners of Drupal 7 sites, migrating to Drupal 9 might seem daunting. But here's some relief: community support for Drupal 7 will be available until November 2023.
For simple sites, the Migrate Drupal module could be helpful, but migrating the "theme" will likely require custom development.
Alternatively, you can rely on Drupal 7 Long Term Support. However, it's important to note that this is a short-term and less secure solution, and it's not recommended.
The migration journey from Drupal 7 to Drupal 9 will be unique for each site. It might not be simple, especially for owners of more complex sites. In such cases, assistance is available. Even for site owners considering a new CMS, Drupal 9 can be a thoughtful choice.
Business Value
Regardless of whether you're currently using Drupal 7 or Drupal 8, it's advisable to begin preparations for upgrading your Drupal site as soon as possible.
Drupal 7 was launched nine years ago, making it an opportune time for reassessing the needs of content editors and site users. It's also essential to evaluate the business continuity aspects of maintaining the software and updating your systems.
To better understand how the migration can enhance the experience for today's audience, consider addressing the following questions:
- How relevant and secure are your existing features and modules?
- What is the scope of migration for you? How much time and budget can you allocate, and what developer skill set do you possess?
- What will be the impact of design and architecture changes after the upgrade on the existing site's content?
With these questions to answer and a migration journey to undertake, you may find it beneficial to have experts and partners who can provide assistance and support.
A good time to do some field re-engineering
The objective of field re-engineering is to assess the data types of each field and ensure they are appropriate.
Below are some common examples of incorrect field types often found in Drupal 7:
- Using plain text instead of a Date field
- Using CKEditor instead of plain text
At the destination site, there are two approaches:
- Change the field types and migrate the data (ensuring compatibility between source and destination data types)
- Move fields to the same type and migrate from the old to the new field type on a case-by-case basis
This process significantly enhances the editorial experience.
In addition to the above considerations, it's crucial to evaluate the different integrations available on the current site and how they will be implemented in the migrated site.
If there are custom integrations, they will need to be rewritten to be compatible with Drupal 9. However, this topic extends beyond the scope of this article.
Expected Drupal 9.1 Features
Although Drupal 9 has recently been launched, the process of updating dependencies and removing deprecated code will continue in the coming months. It's anticipated that no major updates will occur until the release of Drupal 9.1.
The community is actively working on introducing a new default frontend theme called Olivero, which is expected to become an experimental theme in the upcoming update.
Drupal 9.1.0 is scheduled for release by the end of 2020. This release will bring new deprecations and features, setting the stage for the development of Drupal 10 within the Drupal 9 framework.
Interesting Final Notes
The end-of-life date for Drupal 7 has been extended to November 2023, providing users with more time to transition. However, Drupal 8 will reach its end-of-life on November 2, 2021, due to Symfony 3's end-of-life. It's worth noting that migrating directly from Drupal 7 to Drupal 9 is now supported with the core Migrate module.
Regardless of your current Drupal version, preparing to upgrade your site is a proactive move. It presents an opportunity to not only meet the needs of today's audience but also to evaluate business continuity and system maintenance.
Interested in learning more? Schedule a call with our experts.