Skip to content
Architecture 8 min read

AstroPress Architecture: Zero-Cold-Start Headless WordPress on Cloudflare Edge

The Problem with Traditional WordPress Monoliths

WordPress remains the world's most intuitive content authoring system for non-technical writers. However, running WordPress as a monolithic LAMP stack incurs severe performance penalties: database locks on high-concurrency traffic, complex caching plugin configurations that break on dynamic queries, and high server memory overhead.

Decoupling with AstroPress & Cloudflare Edge

AstroPress decouples the editing experience from content delivery. Authors continue writing in the familiar Gutenberg editor inside an isolated, private WordPress admin instance. When a post is published or updated, WordPress fires an authenticated HMAC webhook to our Astro application deployed on Cloudflare Pages and Workers.

4-Tier Caching Architecture

  1. Browser HTTP Cache: max-age=0, must-revalidate to allow immediate rendering updates without hard browser refreshes.
  2. Cloudflare Edge Cache: 1-year (31,536,000s) TTL via CDN-Cache-Control and Cloudflare-CDN-Cache-Control.
  3. Worker In-Memory Shield: Cloudflare caches.default queries preceding any dynamic SSR code execution.
  4. On-Demand Webhook Purging: Cloudflare Zone Cache and Worker Cache purged instantly upon CMS post mutations.

Pure PHP AWS SigV4 Media Offloading

Rather than relying on bloated heavyweight AWS SDK vendor bundles, the AstroPress companion plugin incorporates an ultra-lightweight, 240-line pure PHP AWS Signature Version 4 implementation. Every media upload in the WordPress media library is automatically streamed directly into Cloudflare R2 object storage with zero egress costs.