Cloudflare Cache Rules for WordPress: Full-Page HTML Caching Without Breaking wp-admin
1. Why Default Cloudflare Settings Only Cache Images & CSS—Not WordPress HTML
A common misconception is that turning on Cloudflare’s orange proxy cloud automatically caches your WordPress pages. By default, Cloudflare caches static extensions (.css, .js, .jpg, .woff2) while passing every HTML document straight back to your origin PHP server—leaving TTFB at 200–600ms for distant international visitors.
With Cloudflare’s modern Cache Rules, you can safely cache anonymous WordPress HTML at the edge while bypassing whenever a user holds a wordpress_logged_in_, comment_author_, or woocommerce_items_in_cart cookie.

// Cloudflare Cache Rule Expression (Bypass on Auth/Admin, Cache Public HTML):
(not http.cookie contains "wordpress_logged_in_" and
not http.cookie contains "woocommerce_items_in_cart" and
not starts_with(http.request.uri.path, "/wp-admin") and
not starts_with(http.request.uri.path, "/wp-login.php"))
2. Verifying Edge Cache Hits With curl
After enabling your Cache Rule, test any public URL twice with curl -sI https://yourdomain.com/ and look for cf-cache-status: HIT on the second request. Also confirm that /wp-admin/ continues returning cf-cache-status: DYNAMIC or BYPASS.
FAQ — Will edge HTML caching break my contact form? No, provided your form submits via REST API or admin-ajax.php POST requests (POST requests are never cached) and nonces do not expire faster than your Edge TTL.