All posts

Five ways a Magento deploy breaks checkout

Magento 2 checkout is a large client-side application sitting on top of a large server-side one. A release can pass every check on staging and still break it in production. These five patterns come up again and again, and each one leaves a different trace.

Free checkout scan

Enter your store address. A real browser adds a product to the cart and walks the checkout up to the payment step, like a customer, and shows you every step with a screenshot.

  • Free, no account
  • Stops before payment, no order
  • Nothing to install
· Updated · 4 min read
A rocket lifting off in a cloud of smoke
1Static contentmissing JS → endless spinner2Cachesold page, new files33rd-party modulesmixin breaks payment step4Configno shipping for a country5CSPpayment widget blocked
Five layers a deploy touches — each can break checkout while every page still returns 200.

Find the symptom first

Open the checkout in a private window with the browser console and the Network tab open, and match what you see:

What you seeLikely causeWhere to look
Spinner that never ends, empty payment stepStatic content missing for the live theme or localeNetwork tab: 404 on a .js or .html file
Works after a hard refresh, fails for customersStale cache or mixed static versionsResponse headers, Age, CDN cache
Error in the console after a module updateA JavaScript mixin no longer matchesConsole stack trace names the module
No shipping or payment method for some countriesConfiguration differs from stagingStores → Configuration, config:show
Payment widget never appearsContent Security Policy blocks a scriptConsole: “Refused to load the script”

1. Static content that did not deploy

Checkout is built from RequireJS modules and Knockout templates served as static files. If setup:static-content:deploy ran for the wrong locale or theme, or did not run at all, checkout loads a page shell and stops. The HTML is fine; one missing JavaScript file is not. Deploy every locale and theme the store actually uses:

bash
bin/magento maintenance:enable
bin/magento setup:upgrade --keep-generated
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US el_GR --jobs=4
bin/magento cache:flush
bin/magento maintenance:disable
List the locales from Stores → Configuration → General → Locale Options for each store view. In developer or default mode, add -f.

2. Stale caches and version mismatches

Full page cache, Varnish, a CDN and the browser all hold copies of something. After a deploy, a cached page can reference a static version that no longer exists, or a new page can meet an old cached section. The symptom is intermittent: it works for you after a hard refresh and fails for customers.

Flush Magento, then purge Varnish and the CDN, in that order, and check from a clean browser with no cookies. This shows whether the checkout came from a cache:

bash
curl -sI https://example.com/checkout/ | grep -iE "cache-control|age|x-cache|x-magento"

3. A third-party module update

Payment, shipping, one-step checkout and tax modules plug deep into the checkout layout and JavaScript mixins. A composer update pulls a new minor version, a mixin now targets a method that changed, and the payment step throws. The error is in the browser, so the server log stays clean.

When checkout fails right after a deploy, the package diff is the first place to look:

bash
# Which packages changed in this release?
git diff HEAD~1 -- composer.lock | grep -E '^[-+]\s+"(name|version)"'

# Which modules are enabled now?
bin/magento module:status --enabled | grep -v Magento_

4. Configuration drift between environments

Shipping methods, payment credentials, allowed countries and minimum order amounts live in the database, not in code. Staging has sandbox keys and a permissive setup; production has something else. A config import, or a manual change made the same afternoon, can leave production with no shipping method for a country or a payment method switched off.

bash
# Compare the values that decide whether a shopper can pay
bin/magento config:show carriers/flatrate/active
bin/magento config:show general/country/allow
bin/magento config:show payment/checkmo/active
Keep checkout config in code

Settings locked in app/etc/config.php or env.php with app:config:dump cannot drift through the admin, and they travel with the release.

5. Content Security Policy

Since Magento 2.4.7, CSP runs in restrict mode on payment pages. A new tracking script, a payment provider domain or an inline script that is not allowed gets blocked by the browser. The page looks normal until the moment the payment widget should appear, and the console shows the blocked URL.

Allow the domain in a csp_whitelist.xml in your own module, not by switching CSP off. After every release, watch the console on checkout, or let a monitor record it as evidence on each run. Related: upgrading Magento 2.4 safely, full page cache and checkout and checkout stuck on billing.

Check your own store now with the free Magento checkout test: it walks the checkout in a real browser, Luma or Hyvä, and shows the step where it stops.

Find out your checkout broke before your customers do.

Real checkout checks for Magento and WooCommerce · free plan · no card requiredMagento checkout monitoring →
FAQ

Common questions

Still have a question?More answers, and a way to reach us.Support →
01Why does Magento checkout break after deployment?

Most often static content was not deployed for the live theme or locale, caches still hold old versions, a module update changed checkout JavaScript, configuration differs between environments, or a Content Security Policy blocks a payment script.

02What should I run after a Magento deploy?

setup:upgrade, setup:di:compile and setup:static-content:deploy for every theme and locale in use, then flush caches, and walk a full checkout on production.

03How do I find what broke after a deploy?

Open the checkout with the browser console open: a failed RequireJS file, a 404 on a static file or a CSP violation names the cause.