Check 44.14 · Redesign and migration

Test performance before launch

Compare the staging site's performance with the current site's, template by template, using Lighthouse, Lighthouse CI and decision thresholds.

Priority
Critical
Difficulty
Intermediate
Estimated time
1 to 2 days
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A redesign changes page weight, fonts, scripts and often the hosting: performance can improve just as easily as it can collapse. This task measures the new site on staging, under conditions comparable to production, and compares it with the current site, template by template. Once it is done, you know before launch whether each template does at least as well as the old one on LCP, CLS and blocking time, and any regressions are fixed or accepted in writing.

Why it matters

The Core Web Vitals Google uses are field data: data from the CrUX report (Chrome User Experience Report), measured on real Chrome users, at the 75th percentile, over a rolling 28-day window. A staging site has no visitors, so no field data. Lab tests (Lighthouse, WebPageTest) are the only preview available before launch.

After launch, it takes weeks for field data to reflect the new site, then more time to fix things. A regression discovered at that stage weighs on visitor experience and conversion for that whole period. Core Web Vitals are one of Google's page experience signals, among many others: a slow but highly relevant page can still rank well, but nothing justifies degrading speed by accident.

The causes of regressions are well known: a heavier new theme, a carousel at the top of the page, extra web fonts, added tracking scripts, a JavaScript framework instead of server-rendered HTML, images that are not resized, no caching on the new hosting.

What it improves

  • Core Web Vitals after launch Regressions are fixed before they reach visitors.
  • Conversion Commercial pages do not slow down at a time when traffic is already weakened by the migration.
  • Crawling A slower server reduces the rate at which Google crawls, which delays the processing of redirects.
  • Launch decision A shared, quantified criterion rather than an impression.
  • Rankings Indirect and limited effect; above all, the task protects the visitor experience.

How to check

The deliverable is a completed comparison table, one row per template, with the median of five lab measurements on mobile:

Template Tested URL LCP before LCP after CLS before CLS after TBT before TBT after Weight before Weight after Verdict
Homepage / 2.1 s 3.4 s 0.02 0.15 180 ms 420 ms 1.3 MB 2.8 MB Blocking
Category /thes/the-vert/ 2.4 s 2.2 s 0.05 0.03 250 ms 210 ms 1.6 MB 1.4 MB Pass
Product page /thes/the-vert/sencha/ 2.6 s 2.5 s 0.08 0.04 300 ms 320 ms 1.9 MB 1.8 MB Pass

Fictional values. TBT (Total Blocking Time) is the lab metric closest to INP (Interaction to Next Paint), which can only be measured with real interactions.

How to implement

Step 1 — Measure the baseline on the current site

  1. Field data: for the origin and the most visited URLs, record LCP, INP and CLS at the 75th percentile in PageSpeed Insights or CrUX Vis, and the status of URL groups in the Search Console Core Web Vitals report. These are the figures not to degrade.
  2. Lab data: choose one representative URL per template (homepage, category, product page, article, service page, form) and measure it five times with Lighthouse, on mobile, as described in step 3.

Keep these results with their dates: they are also useful after launch. The reference thresholds (LCP 2.5 s, INP 200 ms, CLS 0.1) are covered in detail in target LCP ≤ 2.5 s at the 75th percentile (opens in a new tab).

Step 2 — Make the staging site comparable

A measurement of a staging site in debug mode, without cache or CDN (Content Delivery Network), says nothing about the future site. Before measuring, make sure you have:

  • the same hosting or equivalent, the same version of PHP or Node.js;
  • the application in production mode, debugging disabled, assets compiled;
  • the same caching and CDN layers as in production;
  • the same third-party scripts (analytics, consent, chat, advertising) as planned at launch;
  • a realistic volume of content and images.

The environment sections below describe these settings in detail.

Step 3 — Measure in the lab

The Lighthouse command line accepts the staging site's authentication header. This script measures a URL five times and displays LCP, CLS, TBT and weight:

AUTH=$(printf 'recette:motdepasse' | base64)
URL="https://preprod.example.com/"

for i in 1 2 3 4 5; do
  npx lighthouse "$URL" --only-categories=performance --output=json --output-path=./mesure-$i.json \
    --extra-headers="{\"Authorization\":\"Basic $AUTH\"}" --quiet --chrome-flags="--headless"
  jq -r '[.audits["largest-contentful-paint"].numericValue, .audits["cumulative-layout-shift"].numericValue, .audits["total-blocking-time"].numericValue, .audits["total-byte-weight"].numericValue] | @tsv' mesure-$i.json
done

Take the median of the five lines. Run exactly the same script on the equivalent URL of the current site, from the same machine, with no other load: variability between two measurements is high, and only a comparison under the same conditions means anything. Lighthouse's default mobile profile is the right starting point; add --preset=desktop for the desktop version.

For INP, open the staging site in Chrome, in the DevTools Performance panel, and perform the key interactions (opening the menu, adding to cart, applying a filter): the panel shows the response time of each interaction. Lighthouse's timespan mode also measures the interactions of a user flow.

WebPageTest gives a complementary view (filmstrip of the load, request waterfall), provided it can reach the staging site: its scripts let you add an access header.

Step 4 — Automate with Lighthouse CI

To measure on every deployment to staging and block regressions, add a lighthouserc.json file at the root of the project:

{
  "ci": {
    "collect": {
      "url": [
        "https://preprod.example.com/",
        "https://preprod.example.com/thes/the-vert/",
        "https://preprod.example.com/thes/the-vert/sencha/"
      ],
      "numberOfRuns": 5,
      "settings": {
        "extraHeaders": "{\"Authorization\": \"Basic BASE64_IDENTIFIANTS\"}"
      }
    },
    "assert": {
      "assertions": {
        "largest-contentful-paint": ["error", {"maxNumericValue": 2500, "aggregationMethod": "median"}],
        "cumulative-layout-shift": ["error", {"maxNumericValue": 0.1, "aggregationMethod": "median"}],
        "total-blocking-time": ["warn", {"maxNumericValue": 200, "aggregationMethod": "median"}],
        "resource-summary:script:size": ["warn", {"maxNumericValue": 350000}]
      }
    }
  }
}

Run npx @lhci/cli autorun in the continuous integration pipeline. Do not commit the credentials: inject them from a secret variable. The JavaScript weight limit is an example, to be replaced by your performance budget (opens in a new tab); the full setup is described in integrate SEO, performance and accessibility tests into CI/CD (opens in a new tab).

Step 5 — Decide

Write the decision rule before measuring, for example:

Situation for a template Decision
Every metric equal to or better than the old site, or under the “good” thresholds Pass
One metric degraded but still under the “good” threshold Acceptable, to fix after launch
LCP or CLS above the “good” threshold when the old site was under it Blocking for high-traffic or revenue-generating templates

The thresholds are Google's thresholds for field data; in the lab, they serve as reference points, not as a verdict. If the site receives a lot of traffic, add a load test (with k6, for example): a site that is fast for one visitor can slow down sharply under launch-day load.

Cloudflare

Versions Cloudflare dashboard, all plans, November 2026.

Route the staging site through Cloudflare (proxied hostname) with the same caching and optimization rules as in production; otherwise you are measuring the origin alone. If the staging site is protected by Cloudflare Access, give Lighthouse the CF-Access-Client-Id and CF-Access-Client-Secret headers of a service token instead of the Authorization header.

WordPress

Versions WordPress 6.4 and later.

On the staging site, enable the same caching plugin and the same optimizations as in production (WP Rocket, LiteSpeed Cache or another). In wp-config.php, define( 'WP_DEBUG', false );. Disable Query Monitor and development plugins during measurements. On a managed WordPress host, check that server caching is active on the staging environment: some hosts disable it by default.

Laravel

Versions Laravel 12 and 13.

In the staging .env, APP_DEBUG=false. On deployment, compile the assets and cache the configuration, routes, events and views:

npm run build
php artisan optimize

Check that OPcache is enabled (php -i | grep opcache.enable) and that no public/hot file remains: it points to the Vite development server and would load uncompiled assets.

Next.js

Versions Next.js 15 and 16 (App Router).

Always measure a compiled build, never the development server:

next build && next start

next dev compiles on demand and optimizes nothing: its figures bear no relation to production. Also check the JavaScript bundle size that next build displays for each route.

Vercel

Versions Vercel, all plans, November 2026.

Preview deployments run on the same infrastructure as production: they are good candidates for measurement. If Deployment Protection is enabled, pass Lighthouse the x-vercel-protection-bypass header with the “Protection Bypass for Automation” secret.

Shopify

Versions Shopify, Online Store 2.0 themes, November 2026.

An unpublished theme can be previewed from Online Store > Themes, with the “Preview” action; the preview's share link can be measured with Lighthouse. Compare it with the published theme on the same pages, and disable in the preview the apps you will not keep: each app can add its own scripts.

Common mistakes

  • Measuring in development mode (next dev, APP_DEBUG=true, WP_DEBUG enabled): the figures say nothing about the future site.
  • Measuring without the CDN or cache planned for production, or with fewer third-party scripts.
  • Comparing a single measurement: the gap between two Lighthouse runs can exceed the gap between the two sites.
  • Comparing different conditions: different machines or networks, or mobile and desktop profiles mixed up.
  • Testing only the homepage: regressions often hide in product pages and articles, which carry the traffic.
  • Confusing the score with the metrics: a higher Lighthouse score can hide a worse LCP on the template that matters.
  • Forgetting interactions: TBT is no substitute for testing INP on real actions.

Frequently asked questions

Can you measure a site's Core Web Vitals before it goes live?

Not the field data: the Core Web Vitals Google uses come from real Chrome users, over 28 days, and a staging site has none. So you measure in the lab, with Lighthouse or WebPageTest: LCP, CLS and Total Blocking Time, which gives a preview of INP. Compare these measurements with those of the current site taken under the same conditions, rather than aiming for an absolute score.

How do you run Lighthouse on a password-protected staging site?

The Lighthouse command line accepts the --extra-headers option, which lets you send the Authorization header for basic authentication, or the headers of an access token such as those of Cloudflare Access or Vercel. Lighthouse CI accepts the same setting in its configuration file. Another option is to run Lighthouse from Chrome DevTools after logging in, because the panel keeps the session cookies.

How many times should you run Lighthouse to compare two versions?

At least three times, ideally five, per URL and per version, keeping the median. Lab measurements vary from one run to the next depending on machine load, network and server. Run the tests for the old site and the staging site from the same machine, in the same time slot, with the same settings: only a comparison under identical conditions lets you draw a conclusion.

Does a slower redesign lose rankings?

Not automatically. Core Web Vitals are one of Google's page experience signals among many others, and content relevance carries more weight. But a slower redesign degrades visitor experience and conversion at a time when traffic is already weakened by the redirects, and its effects only show up in field data after several weeks. It is better to fix regressions before launch.

Updated on

Topic checklist (PDF)

And now?

In the “Redesign and migration” topic

  1. Crawl the site before the redesign
  2. Export URLs and metadata
  3. Export Search Console and analytics data
  4. Export backlinks
  5. Identify revenue-generating pages
  6. Identify pages cited by AI systems
  7. Identify strategic pages to preserve
  8. Keep high-performing URLs if possible
  9. Create a comprehensive redirect map
  10. Map old URLs to relevant equivalents
  11. Preserve strategic content and internal links
  12. Preserve structured data, entity identifiers and important anchors
  13. Protect and audit the staging site
  14. Test performance before launch
  15. Test redirects
  16. Check canonicals, hreflang, sitemaps and robots.txt
  17. Remove indexing blocks on the live site
  18. Check tracking
  19. Submit new sitemaps
  20. Use Google's Change of Address tool if applicable
  21. Crawl the site after launch
  22. Monitor critical errors daily
  23. Monitor rankings, traffic and AI citations
  24. Keep redirects for at least a year, ideally longer
  25. Prepare a rollback plan