WordPress · Drupal · Site Maintenance · Technical SEO · Editorial Policy

Planning a Major Drupal Upgrade: Staging, Testing and Rollback

A major Drupal upgrade goes well when the work happens before launch day. The risky parts are rarely the core files themselves. They are the contributed modules, the custom code and the theme that no one has looked at for a long time. This guide covers how to plan the upgrade as a project: what to list, where to rehearse, what to test, when to schedule it and how to undo it if needed.

Decide what kind of upgrade you are planning

Moving between supported major versions is different from leaving an unsupported one. Drupal 7 reached end of life on 5 January 2025, so a site still on it no longer receives security fixes from the Drupal Security Team. That site usually needs a migration into a current major version rather than a simple update, and the content, configuration and theme layers are often rebuilt along the way.

A site already on a supported major version usually follows a Composer-based path: update the codebase, run the database updates, then export and review configuration. Write down which of the two situations you are in, because it changes the length of the project and the budget.

Also decide the goal in one sentence, such as “same site, same features, on a supported version.” Upgrades that quietly turn into redesigns tend to overrun. Keep redesign ideas on a separate list.

Build an inventory of add-ons and custom code

The inventory is the most useful document in the project. Every module, theme and library on the site should appear in it, with a decision beside each one.

  • Contributed modules: for each one, check its project page on drupal.org for a release that supports the target major version, and note who maintains it.
  • Modules you no longer use: uninstall them on staging before the upgrade instead of carrying them forward.
  • Custom modules and themes: list each one, what it does, and who understands it. Code that calls removed or deprecated APIs needs developer time.
  • Patches: if your Composer setup applies patches to core or modules, list each patch and check whether it is still needed or already merged upstream.
  • Integrations: payment gateways, CRM connections, search services, analytics tags and single sign-on all belong on the list.
  • Content model: content types, fields, taxonomies, Views and user roles, since these are what editors depend on every day.

Tools exist to help. The contributed Upgrade Status module reports compatibility problems in your installed modules and custom code, and Drupal Rector can automate some code changes. Both are community projects, so check their project pages for the current state before relying on them. Running composer outdated and composer why-not against the target version also shows which packages block the move.

Mark each item as keep, replace, remove or rewrite. A module with no compatible release is not a dead end. You can replace it with a core feature, switch to a different module, or fund the work to update it. The point is to find these cases early.

Rehearse on a staging copy

Never run the first upgrade on the live site. Create a staging copy with a recent database snapshot, the same codebase and the same PHP version family as production. Hosting plans differ in how they handle this, so check what your host offers for cloning environments.

Keep staging safe from side effects. Disable outgoing email or route it to a test inbox, use sandbox credentials for payment and other services, and block search engines from indexing the copy.

Work through the upgrade on staging in the order you will use on launch day:

  1. Put the code under version control and confirm the current site runs cleanly on staging.
  2. Check that PHP and database versions meet the target version’s requirements on the official Drupal documentation.
  3. Update the codebase with Composer and resolve conflicts one at a time.
  4. Run database updates with Drush and note every error.
  5. Export configuration and review the differences before committing them.
  6. Clear caches and test.

Time each step. These timings feed directly into your maintenance window. If the rehearsal fails, that is the process working as intended. Fix the cause, restore a fresh snapshot and run it again until it succeeds without improvisation.

Write a test plan for key pages and forms

A test plan is a short list of things that must work, with a named person responsible for each. Start from what the business needs, not from what the code contains.

  • Top pages: the home page, main landing pages, and your most visited articles or product pages. Check layout, images, links and menus on desktop and phone.
  • Forms: contact, quote request, newsletter signup, search and login. Submit each one and confirm the message arrives where it should.
  • Money paths: checkout, donations or bookings, if you have them, using test mode.
  • Editor workflow: log in as an editor, create content, upload media, preview and publish.
  • Permissions: test each user role to confirm people see only what they should.
  • Search and SEO basics: URL aliases, redirects, page titles, meta descriptions, canonical tags and the XML sitemap.
  • Logs: check the Drupal status report and recent log messages for errors after each test session.

Ask a few people who use the site daily to test as well. They notice small workflow breaks that a developer would miss. Record results in a shared sheet so you can compare the same checks before and after launch.

Schedule the upgrade

Pick a window based on your own traffic and your own calendar. Look at when visitors and orders are lowest, and avoid campaign launches, sales periods and the days when your developer is unavailable.

Set a content freeze if the migration copies content at a point in time. Tell editors when it begins and ends. If the site stays editable during the upgrade, plan how to handle content added after the snapshot.

Add buffer to the timings from your staging rehearsal. Decide who is on call, who approves the go-live and who can say stop. Also plan a short watch period after launch, with someone checking logs and forms rather than assuming silence means success.

Keep an eye on the Drupal Security Team advisories at drupal.org/security during the project. If an advisory affects a module you run, you may need to apply it to the current production site while the upgrade is still in progress.

Prepare a rollback plan

A rollback plan is only real if you have tested it. Before launch day, write down exactly how you would return to the old site, and try the restore on staging.

  • A full database backup taken immediately before the upgrade starts.
  • A copy of the files directory and the old codebase, tagged in version control.
  • A tested restore procedure with the commands written out and timed.
  • A named decision point, such as “if checkout or login still fails at this time, we restore.”
  • A plan for any data created after the backup, such as orders or form submissions, so it is not lost on restore.
  • A note on DNS, caching layers and CDN settings, since these can hide the restored site from visitors for a while.

Set the decision point before you begin. People under pressure tend to keep fixing, so a pre-agreed deadline protects you from drifting into a long outage.

Frequently asked questions

How long does a major Drupal upgrade take?

It depends on the number of modules, the amount of custom code and the quality of your content model. Your inventory and staging rehearsal give the real answer, so measure rather than guess.

Can I upgrade without a developer?

A simple site with few modules may be manageable for someone comfortable with Composer and Drush. Sites with custom code, patches or complex integrations are better handled by a developer, and a staging copy is essential either way.

Should I update modules before the major upgrade?

Usually yes. Bringing modules to their latest releases on the current version first removes problems early and makes the compatibility report clearer. Do it on staging first, then on production, and test each step.

Official upgrade guidance and system requirements are in the Drupal documentation, and security advisories are published on the Drupal security page.

We use essential cookies to make this site work and remember your preferences. We do not use advertising or analytics cookies. Privacy Policy. Cookie Policy.