Cookie Settings

Choose which cookies to allow.

Full list in our Privacy Policy.

Cloudflare Cache Rule Is Not Enabled: What It Means and How to Fix It

A WordPress plugin toggle switched off and the empty spot it leaves in the zone's Cloudflare cache rules

“Cloudflare Cache Rule is not enabled.” is printed by a WordPress plugin’s cache test, not by Cloudflare. It means the plugin is not connected to Cloudflare, or its Enable Cloudflare CDN & Caching toggle is off. We read all 79 releases of the plugin on wordpress.org: none of the 37 that print this message, or its older wording, reads your Cloudflare zone before printing it. Fix the plugin first, then check in Cloudflare that a cache rule caches your pages and leaves logged-in visitors and carts out. Lelops Advise lists your zone’s cache rules, turns a disabled one back on and creates the WordPress rules, saving a version for each change.

What Does Cloudflare Cache Rule Is Not Enabled Mean?

It reports the plugin’s own settings, not your zone. The message comes from the Test Cache button of Super Page Cache, a WordPress plugin that manages a Cloudflare cache rule for your site. That test of the connection and the toggle dates from release 5.3.0. Releases 5.0.0 to 5.2.4 printed the message, or the older “Cloudflare (Cache Rule or Worker) is not enabled”, when no rule ID was stored in the plugin’s settings.

None of these conditions is read from Cloudflare, so turning a rule on in the Cloudflare dashboard doesn’t clear the message. Release 5.3.11, published November 19, 2026, is the first to also check the rule in your zone, with separate messages for a rule that is missing, turned off or set to bypass the cache.

The toggle goes off in three ways: you turn it off and save, or you disconnect Cloudflare, and both delete the plugin’s rule in your zone; or the rule creation fails after you connect, and the plugin turns the toggle back off.

How to Fix Cloudflare Cache Rule Is Not Enabled

Plugin first: the token permission, the toggle and Test Cache in WordPress, then the plugin’s rule in Cloudflare

Fix it in the plugin, then confirm the rule in Cloudflare:

  1. Give the API token the cache rules permission. Cloudflare lists Zone > Cache Rules > Edit among the permissions a token needs to manage cache rules. The plugin’s instructions start from the WordPress token template and add Cache Rules Edit and Transform Rules Edit.
  2. Reconnect and read the answer. “Cloudflare connected, but Edge Caching could not be enabled” means the connection worked, the rule creation failed, and the plugin turned the toggle back off.
  3. Turn the toggle on, save, and run Test Cache again. It now reads the cf-cache-status header of a test page instead of printing the message.
  4. Find the rule in Cloudflare. In Caching > Cache Rules, the rule named “[DO NOT EDIT] WP Super Page Cache Plugin rules for https://example.com” must be turned on and set to Eligible for cache. Don’t edit it: put your own changes in a separate rule.
  5. Check the rule count. A zone holds 10 cache rules on the Free plan, and the plugin can’t add its rule to a full list.
  6. Delete a leftover Cache Everything Page Rule. Plugin releases up to 4.7.10, from April 2024, created one, and Page Rules are deprecated. Rules products override Page Rules only when both match a request, so the requests the plugin’s rule leaves out, /wp-admin, /wp-login and logged-in visitors, still get the old Page Rule.

How to Check That Cloudflare Caches a WordPress Page

Request a public page twice with curl -sI https://example.com/sample-page/ and read the cf-cache-status header of the second answer. HIT means Cloudflare served the page from cache, and a first MISS is normal. The two answers that mean the page isn’t cached point to different fixes:

  • DYNAMIC: Cloudflare decided before looking in the cache that the page was not eligible. Either no rule makes HTML eligible, since Cloudflare doesn’t cache HTML by default, or a Bypass cache rule matches, or Development Mode is on for its three hours.
  • BYPASS: a rule made the page eligible, and the origin’s response stopped it with a Set-Cookie header, or with Cache-Control: no-store or private.

Then send the same request as a logged-in visitor: curl -sI -H "Cookie: wordpress_logged_in_test=1" https://example.com/sample-page/ must answer DYNAMIC, never HIT. Rules simulator shows which cache rules apply to a URL with the cookies you set; it needs the Administrator or Super Administrator role.

The Cloudflare Cache Rule for WordPress and WooCommerce

Two Cloudflare cache rules for WordPress: Eligible for cache on every page, then Bypass cache for the admin, logged-in visitors and carts, placed last

Page Rules’ Cache Everything setting is Eligible for cache in a cache rule, and Cloudflare’s own example warns that it caches all HTML, dynamic content included. Without a plugin, we recommend two rules in Caching > Cache Rules, in this order, because when two rules set the cache the last matching rule wins:

  1. Cache WordPress pages: Hostname equals example.com, then Eligible for cache, with Edge TTL set to “Use cache-control header if present, use default Cloudflare caching behavior if not”.
  2. Bypass the admin, logged-in visitors and carts: Bypass cache, placed after the first rule, with this expression:
(starts_with(http.request.uri.path, "/wp-admin")
 or starts_with(http.request.uri.path, "/wp-login.php")
 or starts_with(http.request.uri.path, "/wp-json")
 or starts_with(http.request.uri.path, "/cart")
 or starts_with(http.request.uri.path, "/checkout")
 or starts_with(http.request.uri.path, "/my-account")
 or http.cookie contains "wordpress_logged_in_"
 or http.cookie contains "comment_author_"
 or http.cookie contains "woocommerce_items_in_cart"
 or http.cookie contains "wp_woocommerce_session_")

The cookies are the ones WordPress sets after login and for commenters and WooCommerce lists for carts. WooCommerce also asks to keep its Cart, Checkout and My Account pages out of the cache: replace the three example paths with the pages set under WooCommerce > Settings > Advanced. Without these exclusions, the first rule makes logged-in and cart pages eligible too, the setup behind the classic Cache Everything incident where one visitor’s page is served to another.

How to Fix a Missing Cloudflare Cache Rule with Lelops Advise

Ask Lelops listing a zone’s cache rules, with the plugin’s rule switched back on and a version saved

Lelops Advise is the AI assistant in Lelops for teams running Cloudflare: Ask Lelops reads your zone’s configuration and traffic, answers from Cloudflare’s documentation, and creates or changes cache rules when you ask. It covers the Cloudflare side of this message, and Lelops Sentry alerts you when the zone’s cache hit rate drops.

  1. Connect the zone with a scoped API token that allows editing cache rules. You choose which zones Lelops can access and what it can change.
  2. List the zone’s cache rules. In Ask Lelops, the chat panel on the right of the Lelops app, write “List the cache rules of example.com”. Ask Lelops shows the call it is about to make and waits for your OK, then answers from the rules as Cloudflare returns them: each rule’s name, expression, whether it is turned on and whether it caches or bypasses.
  3. No plugin rule in the list: finish the fix in WordPress. The toggle and the token are plugin settings, so set them as in the fix above, run Test Cache, and ask for the list again. The “[DO NOT EDIT]” rule appears once the plugin creates it.
  4. The rule is listed but turned off: turn it on. Ask “Turn on the cache rule [DO NOT EDIT] WP Super Page Cache Plugin rules for https://example.com, keeping its expression and settings.” Cloudflare replaces a rule’s whole definition on update, so before you confirm, check that the expression in the call Ask Lelops shows is the one listed in step 2.
  5. No plugin at all: create the two WordPress rules. Paste the two rules from the previous section and ask Ask Lelops to create the Eligible for cache rule first, then the Bypass cache rule. Cloudflare adds a new rule at the end of the list by default, so this order leaves the bypass rule last, where it wins. Each change saves a version of the zone.
  6. Check the result. Run the two curl requests again, then ask Ask Lelops for the zone’s cache hit ratio over the last 24 hours, or open Sentry > Monitoring and read Cache Rate on the Traffic tab for that zone.
  7. Let Sentry watch the rule, and roll back if a change breaks it. Cloudflare’s notifications include no alert on cache hit ratio. Lelops Sentry compares the zone’s cache hit rate with a baseline learned from its own traffic, and alerts on a drop of 15 points or more under it that lasts three five-minute windows in a row, when the baseline is 20% or more and each window has at least 100 requests: a deleted or bypassed rule turns cached pages into DYNAMIC requests, which lowers that rate. It catches a rule that stops working, not one that never worked, so step 6 stays the check for a new rule. If a change made in Lelops caused the drop, an Administrator opens Guard > Versioning, selects Rollback on the version saved before the change, then Restore and deploy. The zone’s tracked settings, cache rules included, return to that version, and the restore is saved as a new version.

Lelops Advise lists your Cloudflare cache rules, turns the one your plugin needs back on and creates the WordPress rules, with a version saved for each change: lelops.ai/product/advise.

FAQ

Why doesn't the WordPress plugin create the Cloudflare cache rule?

The plugin creates its cache rule when the Cloudflare zone is confirmed. When the creation fails, it sets its Enable Cloudflare CDN & Caching toggle back to off and says that Edge Caching could not be enabled. The failures its code handles are an API token missing a permission, a cache ruleset it cannot read or create, and a rule Cloudflare refuses, for example in a zone that already holds as many cache rules as its plan allows. Cloudflare lists Zone > Cache Rules > Edit among the permissions an API token needs to manage cache rules.

Should engineers edit the plugin's Cloudflare cache rule?

No. The plugin names its rule "[DO NOT EDIT] WP Super Page Cache Plugin rules for" followed by the site's address, builds it from its own settings, and from release 5.3.11 reports a rule whose expression no longer matches those settings. Changes belong in a separate cache rule. Because the last matching cache rule wins a conflict, a bypass rule placed after the plugin's rule takes effect. The plugin adds its rule back at the end of the list whenever it re-creates it, after its toggle is turned off and on or after a reconnect, so check the order again after either.

How do teams cache WordPress pages on Cloudflare without caching logged-in users?

They use two cache rules. The first makes the site's pages eligible for cache, since Cloudflare does not cache HTML by default. The second, placed after it, bypasses the cache for /wp-admin, /wp-login.php, the REST API, the WooCommerce cart, checkout and account pages, and for requests carrying the wordpress_logged_in_, comment_author_ or WooCommerce cart cookies.

Does a Cache Everything Page Rule still apply next to a cache rule?

Yes, on every request that no cache rule matches. Cloudflare's documentation says Rules products override Page Rules only when both match a request. A cache rule that leaves out the WordPress admin and logged-in visitors therefore leaves those requests to the old Page Rule, which is why a leftover Cache Everything Page Rule has to be deleted.

What does CF-Cache-Status DYNAMIC mean on a WordPress page?

DYNAMIC means Cloudflare decided at request time that the page was not eligible for cache and sent it to the origin without looking in the cache. On WordPress it comes from a missing rule for HTML, a matching Bypass cache rule, or Development Mode, which suspends caching for three hours. For a logged-in visitor or a cart, DYNAMIC is the expected answer.

Get started

Connect Cloudflare. See where your edge stands today.

Your first configuration health report, with the fixes to make first, in minutes.

  • No credit card required