A major Drupal upgrade is a good moment to look at speed, but it is also a risk. Caches get rebuilt, modules get swapped and themes change. If you do not measure before you start, you cannot tell whether the upgraded site is faster, slower or just different.
This checklist is split into what to do before the upgrade, what to tune on the new codebase, and how to confirm the result. It is written for site owners and marketing leads who need to know what to ask their developer, and for developers who want a short list to work through.
Record a baseline before you touch anything
Performance work without a baseline is guesswork. Before the upgrade, capture how the current site behaves so you have something to compare against.
- Pick five to ten representative URLs: the homepage, a landing page, a long article, a listing page built with Views, a search page and any page with a form.
- Test each one with a lab tool such as Lighthouse in Chrome, and note the Core Web Vitals it reports. The web.dev Core Web Vitals pages explain what each metric means.
- Check real-user data if you have it, such as the field data in Google Search Console, because lab and field results often differ.
- Note your server response time (time to first byte) for a cached and an uncached request.
- Save the results somewhere your whole team can find them.
Test both logged-out and logged-in views. Anonymous visitors usually get cached pages, while editors and customers with accounts often hit much slower code paths.
Clean up before you upgrade
Upgrading carries every problem you already have into the new version. Removing weight first makes the move easier and the result easier to read.
Review the list of installed modules and uninstall any you no longer use. Each enabled module adds code that Drupal may load on requests. Delete the unused code from the codebase afterwards with Composer rather than leaving it on the server.
Look at your Views as well. A view with many fields, relationships or unlimited results is a common cause of slow pages. Add pagers, reduce the fields loaded, and check that filters and sorts use sensible indexed data.
Finally, check the Status report in the admin area for warnings about the database, PHP settings or file permissions. Fix those first so they do not get blamed on the upgrade.
Caching: confirm each layer is working
Drupal’s caching is one of its strongest features, but it only helps when each layer is switched on and not defeated by custom code.
- Internal Page Cache serves full pages to anonymous visitors without building them again.
- Dynamic Page Cache caches the parts of a page that do not change between users, which helps logged-in visitors.
- BigPipe sends the cacheable parts of a page first and fills in personalised parts afterwards. Check that it still behaves correctly with your theme after an upgrade.
- Views caching can be set per view, using tag-based or time-based rules. Tag-based caching clears when the underlying content changes, which is usually the safer choice.
Drupal uses cache tags, contexts and max-age to decide when something can be reused. A custom module or theme that sets a max-age of zero, or varies a page by something unnecessary, can switch caching off for a whole page. If a page is slow even when you request it repeatedly, look for that first.
Beyond Drupal itself, a reverse proxy or CDN in front of the site can serve cached pages and static files without reaching PHP at all. Whether you can use one depends on your hosting and plan, so check what is available. If you add one, test that logged-in pages and forms are not cached for the wrong people.
Images: usually the biggest page weight
Images are often the largest part of a page, and they are the easiest win.
- Use image styles so Drupal creates resized versions instead of sending an original photo scaled down in the browser.
- Enable the Responsive Image module in core so browsers can choose an appropriately sized file for the screen.
- Consider modern formats. Core image styles can convert to formats such as WebP, though what the visitor’s browser and your server’s image library support is a setup detail to confirm.
- Give every image a width and height so the layout does not jump while it loads.
- Load images below the first screen lazily, and do not lazy-load the main image at the top of the page, since that can delay your largest content element.
After an upgrade, regenerate or review your image styles. A theme change can quietly request larger files than before.
Scripts and styles: ship less of them
Drupal can combine and compress CSS and JavaScript files. On the Performance page in the admin configuration area, check that aggregation is on for production. Leave it off in development so debugging stays simple.
Then look at what is being loaded. Themes and contributed modules often add libraries to every page when only a few pages need them. Attach libraries only where they are used, and remove third-party scripts such as old analytics tags, chat widgets and tracking pixels that nobody checks any more.
The MDN web performance guides are a reliable reference for loading scripts without blocking rendering, including the defer and async attributes.
Database, PHP and hosting factors
Some slowness is not about Drupal’s settings at all. These factors depend on your hosting, so confirm what your provider allows.
- Run a PHP version supported by your Drupal version, with OPcache enabled.
- Give the database enough memory, and review slow queries if your host exposes a slow query log.
- Consider an external cache backend such as Redis or Memcache through a contributed module, if your hosting supports it. This takes pressure off the database.
- Keep database logging under control. A very large log table adds weight, so consider sending logs elsewhere on busy sites.
- Make sure cron runs on schedule so caches, search indexes and queues do not pile up.
Use Composer and Drush for the upgrade and for clearing caches afterwards, so the steps are repeatable. The official Drupal documentation covers the update process and the performance settings in detail.
Measure again and compare
Once the upgraded site is live, or on a staging copy that mirrors production, repeat exactly what you did for the baseline: the same URLs, the same tools and the same logged-in and logged-out views.
- Clear caches, then request each page twice. The first request shows the uncached cost and the second shows the cached result.
- Compare Core Web Vitals and time to first byte against your saved baseline.
- Check pages that use Views, forms and search, because these are the most likely to regress.
- Watch field data over the following weeks, since it updates more slowly than lab tests.
- Record what you changed and what moved, so the next upgrade starts from a better baseline.
If a result is worse, change one thing at a time. Undoing several changes at once hides which one caused the problem.
Frequently asked questions
Will upgrading Drupal make my site faster by itself?
Not reliably. A newer major version can include improvements, but your modules, theme, hosting and content decide most of what visitors experience. Treat the upgrade as a chance to tune the site, and confirm with before-and-after measurements.
Should I tune performance before or after the upgrade?
Do both, in different ways. Before the upgrade, take a baseline and remove unused modules and heavy views. After it, check caching, images, scripts and hosting settings on the new codebase, then measure again.
Why is my site slow for logged-in users but fast for visitors?
Anonymous visitors are usually served from page caching, while logged-in users get more personalised pages. Check Dynamic Page Cache and BigPipe, look for custom code that disables caching, and review heavy Views on those pages.