What Is Cloudflare Automatic Platform Optimization (APO)?
Cloudflare APO is a service that caches your WordPress HTML pages on Cloudflare’s edge servers, drastically reducing TTFB in global locations. Unlike traditional CDNs that only cache static files, APO delivers full page content from the edge.
Why Use APO on WordPress?
When you test your site in multiple locations, TTFB increases with distance from your origin server. APO eliminates this by serving your entire site from Cloudflare’s network, improving load times and user experience worldwide.
Prerequisites
- A Cloudflare account with your domain proxied.
- An active APO subscription ($5/month or included in Pro plans).
- WordPress site with administrator access.
- Any page caching plugin enabled (e.g. WP Rocket, FlyingPress).
Step-by-Step Guide
- Benchmark TTFB in multiple locations using a tool like KeyCDN Performance Test.
- Ensure your cache plugin is compatible with APO.
- Keep page caching enabled alongside APO.
- Confirm and update your DNS records in Cloudflare.
- Change your domain’s nameservers to Cloudflare’s.
- Activate Cloudflare’s CDN by setting the DNS record to “Proxied.”
- Purchase APO from the Cloudflare dashboard.
- Install the official Cloudflare WordPress plugin.
- Create an API token in Cloudflare and enter it in the plugin settings.
- Purge your cache in both your cache plugin and Cloudflare.
- Confirm APO is working by checking response headers for CF-Cache-Status: HIT.
- Compare APO with the “Cache Everything” page rule to understand key differences.
Step 1: Benchmark TTFB
Use KeyCDN Performance Test to measure TTFB from multiple global points. Run tests before and after activating APO to see the improvement in distant locations.
Step 2: Confirm Plugin Compatibility
Check Cloudflare’s compatibility list for APO. Most popular cache plugins such as WP Rocket, FlyingPress and LiteSpeed Cache support APO without conflict.
Step 3: Keep Page Caching Enabled
APO works in addition to your server-level or plugin-based caching. Maintaining local page caching ensures fast origin responses for Cloudflare Workers.
Step 4: Confirm DNS Records & Nameservers
After adding your site to Cloudflare, verify the DNS records and update your domain registrar to use Cloudflare’s nameservers.
Step 5: Activate Cloudflare CDN
In Cloudflare DNS settings, set your main A or CNAME record to “Proxied” (orange cloud) so traffic routes through Cloudflare’s network.
Step 6: Purchase and Enable APO
In Cloudflare dashboard under Speed → Optimization, subscribe to Automatic Platform Optimization for WordPress. The plugin will detect when installation is complete.
Step 7: Install and Configure the Cloudflare Plugin
Install the Cloudflare plugin from WordPress.org, then add your email and the API token you generated in the Cloudflare dashboard.
Step 8: Purge Cache
Clear the cache in your page caching plugin first, then purge the Cloudflare cache via the plugin or dashboard to ensure fresh content at the edge.
Step 9: Verify APO Is Active
Use a header inspection tool like Uptrends or cURL to confirm CF-Cache-Status: HIT, cf-apo-via: tcache and cf-edge-cache: cache in the response.
APO vs. Cache Everything Page Rule
APO offers smart purges, Workers KV storage, and instant global replication. In contrast, a “cache everything” page rule requires manual purges and uses a pull-model without KV replication.
Wrapping Up
Adding Cloudflare APO to WordPress is straightforward and can greatly reduce TTFB worldwide. Try it yourself and compare it against alternative caching methods to see which delivers the best performance for your site.

