Migrating From Drupal 7 to Drupal 8 and Beyond!

Update for 2021 Drupal 7 & Drupal 8 End of Life

Drupal 7 End of Life date pushed due to Covid
(summary of https://www.drupal.org/psa-2020-06-24)

Drupal 7 has had its support extended by an additional year to Nov 28th 2022. However, just because you now have an extra year, this does not mean you should keep waiting to upgrade. Drupal 9 is already here and it is fantastic! Just do an upgrade directly to Drupal 9 as soon as you can so you’ll be ready when Nov 2022 gets here. It will be here a lot sooner than you expect.

Drupal 8 End of Life date remains the same

Even though Drupal 7 got an extension to its support period, Drupal 8 did not. The reasoning is that Drupal 8 sites should be easy to upgrade and, from my experience, that has been more or less the case.

Drush to Composer

Composer-based Drupal 8 sites won’t need to worry so much. If you’ve already moved from Drush to Composer, your upgrade to Drupal 9 should be fairly seamless. If you are still relying on Drush for updates the process is a bit more complicated. I’ll be writing another post in the coming months covering my process upgrading Drupal 8 to Drupal 9 sites to help anyone that still hasn’t done so. This will include a guide on how to switch from Drush managed to a Composer managed site.

As a quick preview, I have essentially broken down the upgrade process into 3 major tasks. These should be done on a copy of your main site until you can perform the upgrade cleanly with no issues.

  1. Prepare the codebase.
    • This means building a Drupal 9 site with Composer that contains all the modules your current website uses. 
  2. Copy the files.
    • Since your upgraded site is essentially a new codebase, you’ll need your files (public and private) moved over and ready to go.
  3. Update the database.
    • Import the existing database from your current Drupal 8 site and run the database updates.

There are a lot of little gotchas that you might run into during any of these 3 processes and my upcoming blog post will talk more about those. If you simply can’t wait to give it a try, these 3 steps should give you a good framework for moving from Drupal 8 on Drush to Drupal 9.

graphic showing text saying drupal 7 to drupal 8

Drupal 7


 

Drupal 7 (D7) was released as version 7.0 on January 4th 2011. It was the next major release of the Drupal Content Management System (CMS) and built on the success of Drupal 6 (D6). New features were added and the user experience was improved. From this point on, releases to D7 were mostly small changes that fixed bugs, improved security, or made minor adjustments to the CMS with a few new features being added. With the exception of release 7.50 (following 7.44), all releases were incremental. At the time of writing this blog post, Drupal 7 has seen 63 total point releases and saw version 7.67 released on May 8th, 2019.

Release Lifecycle before Drupal 8

Large Breaking Changes

Drupal releases up to D8 used a major and minor release scheme. Major releases (5, 6, 7) could introduce major changes to the structure of Drupal that would not be backwards compatible with modules and themes from previous major versions. In order to release massive new features in Drupal core, a new major version was usually required so most improvements went into “contrib” (the community contributed module/theme ecosystem) or the next major development branch. A few new features did find their way into Drupal 7 minor releases, but the core system remained relatively unchanged.

End of Life and Long Term Support

Previously, Drupal major versions (5.x, 6.x, 7.x) had planned support until the second major release following their own. This meant that with the release of D7, Drupal 5 was no longer supported. With the release of Drupal 8 (D8), D6 was now considered End of Life. As a large number of sites had still not transitioned to D7, a Drupal 6 Long Term Support program was started which recommended that websites that had to stay on D6 could contract a recommended vendor to continue receiving security support for their D6 site.

Release Lifecycle now:

With Drupal 8, a massive shift was made to adopt the latest technology used throughout the web. This meant a large departure from the previous code base. Along with this, Drupal community members saw a need to iterate faster than before. There was a desire to release new features within a major version’s lifecycle (8.1 to 8.2, etc) as well as smooth the disruption experienced when moving between major versions (7 to 8). Along with adopting a 6 month minor release cycle, it was decided to go with new semantic versioning: Major, minor, and patch releases. This would allow the core team to introduce new features in minor versions with patch versions being bug fixes and security patches.

So where did major versions fit in? Well, since Drupal was now using third-party libraries, major versions are needed to move to newer supported versions of those libraries. Also, any features that needed to be deprecated could be with a minor release while still supporting those features through the next major release.

But wait? Won’t that mean another grueling round of migrations and development once Drupal 9 is released? Not likely. Since new features can be released in minor versions, the only changes to occur with a major version should be the dependencies upon which Drupal is built and the removal of deprecated code. This means updates to a new major release will be handled almost identical to the minor releases, and very little disruption will be felt. In fact, as long as module maintainers aren’t using deprecated features, D8 modules will immediately work in D9 at launch and a module maintainer will not need to maintain different codebases for each major version. As of the writing of this post, Drupal 8 just released 8.7.0 and is scheduled to release 8.8.0 in December.

The king is dead, long live the king!

The current plan is for Drupal 9 to be released in June 2020 to coincide with the release of Drupal 8.9.0. Why June 2020? Why not just release D8 minor releases indefinitely? Dries Buytaert, the co-founder and project lead for Drupal, said the following 
“... that approach is not feasible. We need to periodically remove deprecated functionality to keep Drupal modern, maintainable, and performant, and we need to stay on secure, supported versions of Drupal 8's third-party dependencies. As Nathaniel Catchpole explained in his post "The Long Road to Drupal 9", our use of various third party libraries such as Symfony, Twig, and Guzzle means that we need to be in sync with their release timelines.” ~ Dries Buytaert (https://dri.es/drupal-7-8-and-9)

I highly recommend reading his blog post for further insight into these decisions. To summarize the major reason for a D9 release: Symfony 3 will not be supported after November 2021. By releasing D9, Drupal core can move to a newer version of Symfony and continue to receive support for a major component of Drupal. But wait… Drupal 8 uses Symfony 3. Yes. And D8 will ALSO reach end of life Nov 2021. Which means D9 needs to be released BEFORE Nov 2021 to give everyone time to update. June 2020 gives almost a year and a half of leeway, and sites already on D8 will have a very simple upgrade path to D9.

What does Drupal 7 end of life mean for website owners?

Previously, D7 would have reached end of life as soon as D9 released. With D9’s release scheduled for June 2020. The current plan is to extend D7 support through Nov 2021. There is also the possibility of a vendor contracted LTS (Long Term Support) service similar to the one that D6 has been using for over 2 years. After 2021, if you aren’t on D9, you will not receive security updates outside of any contracted vendor support.

So what do you do if you have a D7 site? At this point, your D7 site is likely over 2 years old. D8 offers a number of performance gains as well as improvements to workflows AND D8 has a very easy path to D9, it isn’t even a migration! If, for some reason, you absolutely cannot move to D8 (or D9 when it comes out) you need to start considering budgeting to hire a vendor through the likely Long Term Support program to support your D7 site indefinitely.

What does Drupal 8 end of life mean for website owners?

Make sure you are keeping your D8 site up to date. With 8.7.x released on May 1st 2019, all versions of D8 from 8.5.x and earlier are no longer supported. If you aren’t already on 8.6 or 8.7, update to the latest version of D8 and fix your workflow so you are keeping your website current! Once D9 releases, the update process is simple. Check to ensure any custom modules and themes aren’t using deprecated APIs and functions. A tool to help is available at https://github.com/mglaman/drupal-check. You can actually do this now. Why bother waiting until D9 releases to start ensuring your website is using the latest functionality. Then update to D9 when it comes up. It is as simple as that.

Will we have to rebuild again to move from Drupal 8 to Drupal 9?

If you are using custom code that uses deprecated functionality or unsupported modules? Maybe. If you are up to date with the latest D8 release and your codebase has remained current? Nope. Just update directly to D9. In fact, the release of D8 that coincides with D9 will likely be identical in every way, except the D9 release won’t contain the deprecated code. 

What about the custom Drupal 7 module I am using?

This is a bit more difficult. A lot of the contributed functionality in D7 has received an upgrade path to an equivalent D8 functionality. But not all of contrib has made the transition. You may need to look for a replacement for some contrib that doesn’t have a direct upgrade path. And custom code is even more difficult. Since the user base is likely to only include yourself, only you can support moving it forward to D8. You’ll need to replicate the functionality in D8’s APIs and then set up a migration path between your custom D7 module and the new D8 version you built. If this is absolutely NOT an option for you, you can look into the Long Term Support program and find a vendor capable of securing your site moving forward.

How do I plan for Drupal 9?

If I am on Drupal 6?

First of all. Why? It has been end of life since February 24th, 2016. Unless you have contracted an LTS vendor, your site is horribly outdated, likely insecure, and EGADS! Dare I say, old. But fear not, D8 has a migration feature intended to migrate D6 sites directly to D8. If you only used D6 core, you would need to build a clean D8 site, migrate your D6 site via the Migrate Drupal module, and voila, you have a new D8 site, with all your old D6 content. If you used contrib functionality, you’ll have a bit more work. You will need to build out any features that used contrib in your new D8 site, then migrate over the content that used that contrib via a custom migration. Some contrib modules have migrations already provided, but those that don’t you’ll have to handle yourself. Here is a great resource from the Acquia dev blog explaining a way of migrating from D6 to D8 quickly using ddev https://dev.acquia.com/blog/migrating-drupal-6-drupal-8-boss. Not confident you can manage it yourself? Hire a vendor, like us, to do it for you.

If you DID contract a vendor to support your site, I recommend having a discussion with them as to the best path forward. They may recommend upgrading to D8 and D9, or they may be happy to continue supporting you indefinitely on D6.

If I am on Drupal 7?

Fortunately, your Drupal site is still supported today (assuming you aren’t reading this after D9 releases). You have until Nov 2021 to migrate to Drupal 9 by way of Drupal 8. Once you’ve migrated to D8, the hop to D9 should be very simple. In fact, if you keep your new D8 site up to date, the upgrade to D9 should feel no different than any minor release update for your old D7 site. “But James, there is functionality on my site that just isn’t available on D8.” I hear you. Let’s talk about that functionality. Maybe we can build it together or find someone who can? “But James, I like my D7 site and don’t want to build a new one.” Ok, you’ve got until Nov 2021 to find a vendor to provide LTS support for D7. Drupal will likely have vendor recommendations in the coming year for those interested in participating in the LTS program. The D6 LTS program information is available at https://www.drupal.org/project/d6lts. There is also the start of a page for the D7 program at https://www.drupal.org/project/d7es

If I am on Drupal 8?

Awesome! Welcome to the club. We hope you are enjoying it as much as we have been. Just keep your site up to date with the latest and greatest versions of D8. When D9 comes out you’ll be ready to go. Got some custom code running? Check if any of the API’s or functions used have been deprecated and patch them as necessary. If you don’t have any deprecated code when D9 drops, you should be able to switch over immediately without any complications.

If I am on Drupal 9?

Wait, how? It isn’t past June 2020 and D9 hasn’t been released. Are you hopping on before the first alpha, planning to release your site after the D9 release? Or maybe it is June 2020 and you found this blog post during your search for answers as to why your D9 site doesn’t seem any different than your D8 site. Congratulations, D9 is the latest major version of Drupal. It’s a sleeker version of D8. All the bells and whistles added over the past couple years, but without the cruft we’ve improved and replaced along the way. But if you are using D9 waaaay back in mid 2019 as I write this, tell me your secrets future man. Did NASA’s commercial crew program send an American astronaut to space on board an American rocket, launching from American soil? Does the trade war with China have a winner or does everyone lose? What stock goes gangbusters in Q4?

Where can I learn more about Drupal 9?

If you are currently on D7 or earlier, any information about D8 will be useful to know for D9. A great place to start is the D8 documentation (https://www.drupal.org/docs/8). In fact, if you just want to try it out, you can use simplytest.me to quickly spin up a D8 site and play with it for up to 12 hours. There are also tons of great blogs that discuss various aspects of D8’s systems.

I need help upgrading my Drupal 6 or Drupal 7 website.
Who can help me upgrade from Drupal 6 or 7 to Drupal 8?

Any Drupal shop working with D8 should be able to help migrate your existing site to D8. And while there are lots of resources available online about how to do it yourself, it can be daunting if you’ve never done it before. If you need help we’d love to talk.