Skip to content

Production cutover

The plan for flipping fruitplug.co.uk from the old Butcher theme to the new PWA. Not yet executed — runs at the end of Phase 1 MVP.

Before the cutover

These must all be true:

  • [ ] Phase 1 MVP complete: home, shop, PDP, cart, checkout with Stripe, account, box builder
  • [ ] PWA Lighthouse mobile ≥ 90 Performance, ≥ 95 Accessibility
  • [ ] Every current product URL 301-redirects to the equivalent PWA route (Redirection plugin handles this)
  • [ ] Key customer flow smoke-tested end-to-end: browse → build box → checkout → order in wp-admin → ShipStation pickup
  • [ ] Apple Pay payment works through the new checkout (it's the #1 method today — 158 / 500 sample orders)
  • [ ] Backup taken less than 24h before cutover
  • [ ] HPOS enabled (the sync-first migration via wp-admin)
  • [ ] Stripe Billing flow stood up for subscriptions (replaces Woo Subs)

The flip

The new PWA lives on 147.12.227.117 (this server); WordPress stays on A2 (106.0.62.69). Cutover is a DNS change + Caddy config addition.

Step 1 — Caddy config on this server:

Add to /c/Users/User/Desktop/Caddy/Caddyfile:

fruitplug.co.uk, www.fruitplug.co.uk {
    encode zstd gzip

    # Keep WP admin + REST + uploads on the existing A2 backend.
    @wp path_regexp wp ^/(wp-admin|wp-login\.php|wp-content|wp-includes|wp-json)
    handle @wp {
        reverse_proxy https://fruitplug-a2.example/... {
            header_up Host fruitplug.co.uk
            transport http {
                tls
                tls_server_name fruitplug.co.uk
            }
        }
    }

    handle {
        reverse_proxy 127.0.0.1:3030
    }

    header {
        Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
        X-Content-Type-Options nosniff
        Referrer-Policy strict-origin-when-cross-origin
        -Server
    }
}

Reload Caddy. Cert issues automatically.

Step 2 — DNS flip:

Change the fruitplug.co.uk A-record from 106.0.62.69 (A2) to 147.12.227.117 (this server).

Step 3 — Monitor:

  • curl -sI https://fruitplug.co.uk/ → 200 from Next.js
  • curl -sI https://fruitplug.co.uk/wp-admin → 302 to login (proxied to A2)
  • Place a £1 test order end-to-end
  • Watch the Woo order list populate

Rollback

If anything breaks catastrophically in the first 30 minutes:

  1. Change the DNS A-record back to 106.0.62.69
  2. Propagation takes 5–60 min depending on resolver TTL; set TTL low (300 s) before the cutover
  3. Restore DB from backups/a2-20260424-205535/db.sql only if Woo data was mutated during the failed cutover window (unlikely — we keep the same backend throughout)

After cutover

  • Monitor Sentry for JS errors (set up in Phase 1 polish)
  • Watch PostHog funnels for abnormal drop-off
  • Leave old Butcher theme installed on A2 (deactivated) for 30 days as an in-case rollback option
  • Deprecate dev.fruitplug.co.uk after 2 weeks or re-use it for staging