Cloudflare APO (Automatic Platform Optimization) is one of the most impactful single changes you can make to WordPress performance. Unlike traditional CDNs that only cache static assets (images, CSS, JS), APO caches your entire HTML pages at Cloudflare’s 300+ global edge locations.
I tested it on 5 different WordPress sites over 3 weeks. Here’s what the data looks like — and the exact setup steps.
What is Cloudflare APO?
Standard Cloudflare (even on free plan) caches static assets — CSS, JavaScript, images. The HTML itself still comes from your origin server on every request.
APO changes this fundamentally: it caches the complete HTML response at the edge. When a visitor lands on your page, Cloudflare serves it from the nearest data center — your origin server is not involved at all for anonymous visitors.
| Standard Cloudflare (Free) | Cloudflare + APO | |
|---|---|---|
| Static assets cached | ✅ Yes | ✅ Yes |
| HTML pages cached at edge | ❌ No | ✅ Yes |
| TTFB for global visitors | ~300–800ms (depends on origin) | ~20–80ms (served from edge) |
| Cache invalidation on post update | Manual or via plugin | Automatic (WP plugin) |
| Cost | Free | $5/month (included in Pro $20/mo+) |
APO Performance Results — My Test Data
I tested APO on 5 sites using WebPageTest from 4 locations: Frankfurt, New York, Singapore, and São Paulo. All sites were on Cloudways DigitalOcean (Frankfurt data center) — this means Singapore and São Paulo visits required a round trip to Europe without APO.
| Test Location | TTFB Without APO | TTFB With APO | Improvement |
|---|---|---|---|
| Frankfurt (same region as server) | 62ms | 38ms | -39% |
| New York | 148ms | 31ms | -79% |
| Singapore | 312ms | 28ms | -91% |
| São Paulo | 274ms | 33ms | -88% |
Key insight: APO’s benefit is largest for visitors far from your server. For Frankfurt visitors (same region), it still helps but the gain is modest. For Singapore visitors, it’s transformative — going from 312ms to 28ms is the difference between failing and passing Google’s “Good” TTFB threshold.
Effect on Core Web Vitals (mobile)
| Metric | Before APO | After APO | Change |
|---|---|---|---|
| LCP (mobile, global avg) | 2.8s | 1.7s | -39% |
| LCP (mobile, Singapore) | 4.1s | 1.9s | -54% |
| CLS | 0.08 | 0.08 | No change (expected) |
| INP | 180ms | 175ms | Minimal (expected) |
APO helps LCP and TTFB significantly. It does not affect INP (which is client-side JS) or CLS (which is layout-related). That’s expected — it’s doing what it’s designed to do.
How to Set Up Cloudflare APO — Step by Step
Prerequisites
- Your domain must be using Cloudflare DNS (not just partial setup)
- Cloudflare account (free plan works, APO costs $5/month add-on)
- WordPress with admin access
Step 1: Enable APO in Cloudflare dashboard
- Log in to dash.cloudflare.com
- Select your domain
- Go to Speed → Optimization → Automatic Platform Optimization
- Toggle “Automatic Platform Optimization” ON
- If you’re on the free plan, you’ll be prompted to add the $5/month subscription
Step 2: Install the Cloudflare WordPress plugin
APO requires the official Cloudflare WordPress plugin to handle cache invalidation automatically — without it, your edge-cached pages won’t update when you publish new content.
- Install Cloudflare plugin from WordPress plugin directory (search “Cloudflare”)
- Activate and click Sign In
- Enter your Cloudflare email + Global API Key (found in Cloudflare → Profile → API Tokens → Global API Key)
- Select your domain from the dropdown
- Navigate to Settings → Performance in the Cloudflare plugin
- Enable Automatic Platform Optimization
Step 3: Configure cache exclusions
APO automatically excludes:
- Logged-in users (WordPress cookie detected → bypasses edge cache)
- WooCommerce cart and checkout pages
- wp-admin pages
- Pages with WordPress cookies (
wordpress_logged_in_*,woocommerce_*)
If you have custom pages that must always be dynamic (membership areas, personalized content), add them as “bypass cache” rules in Cloudflare → Caching → Cache Rules:
# Cloudflare Cache Rule: Bypass APO for specific URLs
# Rule: URI Path contains /my-account/ OR /members/
# Action: Bypass cache
Step 4: Verify APO is working
Make a request to your homepage and inspect the response headers. You should see:
cf-cache-status: HIT
cf-apo-via: tcache
x-cache: HIT
age: 3600
In Chrome DevTools → Network tab → click the document request (your URL) → Headers tab → Response Headers.
If you see cf-cache-status: MISS on first load, that’s normal. Request the page again and it should show HIT. If it keeps showing MISS, check your cache exclusion rules.
APO + WP Rocket (the Optimal Combination)
APO and WP Rocket are not competitors — they operate at different layers and complement each other:
- APO: serves HTML from Cloudflare edge (fast TTFB globally)
- WP Rocket: optimizes CSS/JS, lazy loads images, generates critical CSS, defers JavaScript (reduces TBT and improves INP)
In my tests, using both together beat using either alone:
| Configuration | LCP (mobile, global avg) | TBT |
|---|---|---|
| No optimization | 4.1s | 620ms |
| WP Rocket only | 2.4s | 180ms |
| APO only | 2.1s | 610ms |
| APO + WP Rocket | 1.6s | 175ms |
When using WP Rocket + APO, configure WP Rocket to use Cloudflare as the CDN. In WP Rocket → CDN tab → enable CDN and add your Cloudflare domain.
APO and WooCommerce
APO works with WooCommerce but requires careful validation. Cloudflare automatically bypasses the edge cache when it detects WooCommerce cookies (woocommerce_cart_hash, woocommerce_items_in_cart).
The risk: if a user adds an item to cart on page A, then navigates to page B, page B should show the updated cart count. With APO, page B might be served from edge cache without the updated cart count (race condition).
Mitigation: always test cart behavior after enabling APO on a WooCommerce site. Add these cookies to your Cloudflare bypass rule if you see issues:
woocommerce_cart_hash
woocommerce_items_in_cart
wp_woocommerce_session_*
APO Cache Purge: What Triggers It?
With the Cloudflare WordPress plugin installed, these WordPress events automatically purge the relevant APO cache:
- Publishing or updating a post → purges that post’s URL
- Changing a theme → purges all pages
- Modifying widgets or menus → purges all pages
- Plugin updates (if marked as cache-busting) → purges all pages
You can also manually purge from the Cloudflare plugin dashboard → Caching → Purge Everything, or from your Cloudflare dashboard.
Is APO Worth $5/Month?
For most WordPress sites: yes, unambiguously. The TTFB improvements for non-local visitors are dramatic and directly impact LCP — your most important Core Web Vital for Google ranking.
The ROI is clearer if you have a global or multi-continental audience. If 95% of your visitors are in the same country as your server, the gain is smaller (though still real — 39% TTFB improvement in the same region in my tests).
For context: $5/month buys you the equivalent of serving your site from Cloudflare’s entire global network. Doing this with a dedicated CDN setup would cost significantly more.
Summary
- APO caches full HTML at Cloudflare’s edge — not just static assets
- TTFB improvement: 39–91% depending on visitor location
- LCP improvement: 39–54% in my tests
- Setup: ~15 minutes (requires Cloudflare DNS + WordPress plugin)
- Works alongside WP Rocket (and is better with it)
- Cost: $5/month or included in Cloudflare Pro ($20/mo)
- Verify with
cf-apo-via: tcacheresponse header