How a request actually works

Same URL, three architectures. Here's what happens between the click and the pixels.

Traditional WordPress

Every visitor pays the full cost.

  1. 1 Site is deployed to a single origin server deploy
  2. 2 Visitor clicks a link, request hits the origin 50-300ms
  3. 3 PHP-FPM / Apache boots the request 10-50ms
  4. 4 WordPress loads core + every active plugin 50-200ms
  5. 5 MySQL: 30-80 queries (posts, options, meta, menus...) 50-300ms
  6. 6 Theme assembles HTML from PHP templates 20-100ms
  7. 7 Response sent back to the browser 20-100ms
  8. 8 Browser parses HTML and renders
Typical TTFB: 300-1500ms

Astro SSG (headless)

The default. Work happens at build time.

  1. 1 Deploy: CI runs astro build, fetches WP, writes .html files to the CDN deploy
  2. 2 Visitor clicks a link, request hits the nearest CDN edge 5-30ms
  3. 3 CDN returns the pre-built .html file from disk <5ms
  4. 4 Browser parses HTML and renders
Typical TTFB: 20-80ms

Astro SSR (headless)

Opt-in per page. Rendered fresh on a fast runtime.

  1. 1 Deploy: CI ships the Astro app to a serverless / edge runtime deploy
  2. 2 Visitor clicks a link, request hits the runtime 5-30ms
  3. 3 Astro runs the page, fetches fresh data from WP REST 30-150ms
  4. 4 Astro renders HTML and streams it back 10-30ms
  5. 5 Browser parses HTML and renders
Typical TTFB: 50-200ms

The best part: SSG is Astro's default — every page is pre-rendered unless you say otherwise. For pages that need fresh data (search results, logged-in dashboards, cart pages), drop export const prerender = false; at the top of that one .astro file and it switches to SSR. Same project, per-page choice.

Build time vs request time

Traditional WordPress does all the work on every visit. Astro SSG does it once, when you deploy.

Build time (once, when you deploy)

  1. Vercel / Netlify / your CI pulls the repo
  2. npm install + astro build runs
  3. Astro fetches WP REST API for every post/page
  4. Astro writes one .html file per route to /dist
  5. CDN uploads /dist - work is done, weeks-stable

Request time (every visitor)

  1. Visitor hits the URL
  2. CDN edge serves the static .html instantly
  3. Zero PHP, zero MySQL, zero WP plugin code runs
  4. WordPress server can literally be offline

Bonus: what happens when WordPress goes down?

Traditional WordPress

Site returns 500 errors. Every page is dead until WP is back up.

Astro (headless WordPress)

Site keeps working. The HTML is on the CDN, not the WP server. WP only matters at the next build. You can even take WP offline for maintenance and visitors won't notice.