Drupal Version Upgrades

Background

A lady reached out to me recently requesting help with the Drupal-based website that she was working on. She needed to upgrade it from Drupal 7 to Drupal 9. I let her know up front that I had not work with Drupal in some time, so I may not have the best answers, but I would share what I knew and provide the assistance that I could.

Below are the major points that I made. I share this because the videos that I have posted about in the past on Drupal, means that I occasionally, even after no longer working with it, still get questions when someone runs into a problem. This post will serve as documentation in case someone else has a similar problem in the future.

Why Upgrade?

I previously wrote about what was required to move this blog from Drupal 7 to a static website. One of the reason that I did not mention in that post was that the Drupal 7 retirement date had been announced. At that point, I had a decision to make....

  • stay on Drupal and upgrade to version 8, which at the time did not many of the contributed modules that I was currently using ported to version 8
  • find a different tech stack and not worry about keeping up to date with the latest technology.

As you can tell I chose the latter option. Content Management Systems (CMS) have updates released all the time as well as major updates. Reason is that a number of people find the vulnerabilties and exploit them resulting in needed fixes. Once D7 is retired, there will be some websites that have not upgraded that will result in being compromised because they were not secured.

Have a Backup

Always have a backup of the site before doing a upgrade or migration. Reason being is that if something goes wrong during the process, you can fix what went wrong and then try again after restoring your backup.

Having previosuly worked in production support, backup copies of files or databases, can save yourself and reduce the amount of downtime that you have if an issue occurs.

Unproductionalize The Website

It was mentioned that she was getting errors, but some of the errors were not making sense. Told her that in the Drupal documentation, there is a recommended production configuration options. I advised that those be undone as they will provide more detail about the errors that are occurring with the website, which would hopefully assist with fixing the issues that she was encountering.

Do Not Skip Versions

From my experience, when you upgrades and skip the major versions in between, that can make the upgrade go worse than upgrading to each version one at a time. I advised that she uprade from Drupal 7 to 8 and then from 8 to 9. This includes upgrading the modules because they may have migration or upgrade specific code that makes the necessary changes to the database for that version of Drupal.

Furthermore, Drupal 8 was the first version that was based on the Symfony framework. That said, I am sure a number of table changes were made and data moved around to accomidate using that framework that would not be available in the Drupal 9 upgrade.

Conclusion

She thanked me for the advice and said that it did give her a path to follow compared to what she had before hand.

Posted: 2022-09-30
Author: Kenny Robinson, @almostengr