WordPress to Zero-Cost Serverless: A Pixel-Perfect Rebuild with Custom Commerce

Rebuilt Wake the Nile’s WordPress site as a headless Astro + Sanity + Cloudflare Pages app — a pixel-perfect 1:1 migration that lifted the homepage’s mobile Lighthouse performance from 38 to 96, eliminated all recurring platform fees, and shipped a hand-rolled Stripe + Sanity storefront instead of a Shopify subscription. Built in 2–3 days with Claude Code (Opus 4.8).

AstroSanityCloudflare PagesStripeHeadless CMSServerlessE-commerceWordPress MigrationClaude CodeMCP

The Challenge

Wake the Nile — a touring artist on Freeda Records — ran on WordPress on a single ~$10/month Google Cloud VM: one shared-core instance (0.25 vCPU baseline, 1 GB RAM) pinned to one region. On mobile it scored a 38 on Lighthouse performance, with a 7.4-second Largest Contentful Paint. And the next ask, selling merch, pointed straight at Shopify — another monthly subscription, another dashboard. The whole stack was a dead end for AI-assisted iteration: config buried in a database and wp-admin, nothing an agent could safely change in a repo.

~$10/mo GCP VM
Hosting
0.25 vCPU · 1 GB · 1 region
Infrastructure
38
Mobile performance
Shopify (proposed, +fees)
Commerce
Not viable
AI-agent workflow

The Rebuild

A pixel-perfect 1:1 rebuild on Astro 5 (static) + Sanity (headless CMS) + Cloudflare Pages — served from a 330+-city edge network instead of one VM in one region. Nothing was approximated: the video slider came across as a smoother Swiper coverflow, the HubSpot contact form intact, the gold-on-black brand pixel-matched. Checkout and webhooks run as edge-native Pages Functions — V8 isolates hitting the Stripe and Sanity APIs directly, no server to provision or scale. Built in 2–3 days with Claude Code (Opus 4.8), the entire site in one Git repo.

38 → 96
Performance
7.4s → 2.7s
Largest Contentful Paint
1,450ms → 30ms
Total Blocking Time
3.6s → 1.1s
First Contentful Paint
6.4s → 2.9s
Speed Index
61 → 100
Best Practices

Fastest where it counts

The gains land hardest on mobile, where most visitors are and Lighthouse is strictest: a failing 38 climbs to 96, and blocking time all but vanishes (1,450ms → 30ms). Desktop went 85 → a perfect 100. Even the heaviest page — /videos, several autoplaying MP4s — went from 30 → 91, its layout shift erased (CLS 0.194 → 0.002). Static HTML from the edge with zero server round-trip turned performance from a liability into a feature.

Custom commerce — no Shopify

Instead of renting Shopify, the storefront is hand-rolled on Stripe + Sanity in about a day. Sanity is the single source of truth for catalog and inventory; prices go to Stripe dynamically. Shoppers get a custom cart and an Embedded Stripe Checkout that stays on-brand and on-site, plus a thank-you page that reads a Stripe token for real success or error status — not a blind redirect. On payment, a webhook (another Pages Function) writes the order into Sanity and decrements stock automatically. Stripe handles fraud protection, sales tax, and billing — no platform fee on top.

Stripe
Payments
Stripe
Fraud / Tax / Billing
Sanity
Catalog + Inventory
Sanity documents
Orders
CF Pages Functions (edge)
Runtime
$0
Shopify fees

Built to iterate — AI-agent-ready

Everything lives in one Git repo, and every service in the stack (Sanity, Cloudflare, Stripe) ships an MCP server — so an AI agent can drive publishing, schema, and deploys directly, exactly how this was built. A siteSettings collection owns global config; a toggle marks a product sold out; templates bind to Sanity fields, so new features are a commit, not a migration. Content and fulfillment live under one roof — no swapping between a Shopify admin and a separate site dashboard.

$0
Recurring platform fees
~$590/yr
Annual cost avoided
38 → 96
Mobile performance
1 region → 330+ cities
Edge reach
2–3 days
Rebuild time
2 → 1
Platforms consolidated

"One repo, one dashboard, zero recurring fees — a faster site than the one it replaced, with a storefront the client owns outright."

Where this leaves things

The savings are concrete: ~$120/year of WordPress hosting plus a ~$468/year Shopify subscription that never had to start — about $590/year avoided, now $0 on Cloudflare's free tier and comfortably within its limits. What's left is the tedious part: loading the product catalog onto a storefront that's already built, secured, and deployed.