Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting

Cloudflare WordPress Plugin Not Working: Causes and How to Fix It

Cloudflare WordPress Plugin Not Working: Causes and How to Fix It

Short answer

The Cloudflare WordPress plugin usually fails because it cannot sign in with your email and API key or token, the WordPress site URL does not match your Cloudflare zone, APO is not enabled, or another cache keeps serving old pages. Check the token permissions and zone status first.

Key takeaways

  • The plugin connects an existing Cloudflare zone; it does not add your site to Cloudflare.
  • Use an API token with the permissions Cloudflare lists for the plugin.
  • Your WordPress Site Address must match an active, proxied Cloudflare zone.
  • APO bypasses logged-in users and certain cookies by design.
  • Avoid overlapping minification and JavaScript features between Cloudflare and caching plugins.

Why is the Cloudflare WordPress plugin not working?

The Cloudflare plugin usually fails because it cannot authenticate with your Cloudflare account, the domain in WordPress does not match the zone in Cloudflare, APO is not active, or another caching layer conflicts with it.

The official Cloudflare plugin connects WordPress to your Cloudflare account. It can apply recommended settings, purge the cache when you update content, and turn on Automatic Platform Optimization (APO).

The plugin does not put your site on Cloudflare. Your domain must already use Cloudflare's nameservers. If that part is not done, start with our guide on setting up Cloudflare for WordPress.

Typical symptoms:

  • The plugin will not accept your login details
  • It says your domain was not found
  • Cache purges do not seem to work
  • APO shows as on, but pages are not cached
  • Settings change back or fail to save

Can the plugin sign in to your Cloudflare account?

Login failures usually come from a wrong email, a mistyped Global API Key, or an API token that lacks the permissions the plugin needs.

The plugin asks for your Cloudflare email and a key. You can use your Global API Key or create a scoped API token. A token is safer, because it only allows the actions you choose.

Cloudflare's guide to activating the WordPress plugin lists the permissions an API token needs. Cloudflare also explains how to create an API token.

Common mistakes:

  • Pasting an Origin CA key instead of the Global API Key
  • Using a token that is missing a required permission
  • Using a token limited to a different zone
  • Using the email of a team member account that does not own the zone

Create a new token with the permissions from Cloudflare's guide and try again.

Store the token somewhere safe, such as a password manager. Cloudflare only shows a new token once, so you cannot copy it again later from the dashboard.

Does the domain in WordPress match your Cloudflare zone?

The plugin looks up the zone using your WordPress site URL, so a mismatch such as a staging address, a subdomain or an old domain stops it finding your site.

Check Settings > General in WordPress. The Site Address should use the same domain that appears in your Cloudflare dashboard.

Problems often show up when:

  • You run WordPress on a staging or temporary URL
  • The site lives on a subdomain that is not proxied
  • The domain was recently moved to a different Cloudflare account
  • The zone is pending because nameservers have not updated yet

In the Cloudflare dashboard, confirm the zone is Active and the DNS record for your site is proxied, shown with an orange cloud.

If the zone shows as pending, wait for the nameserver change to finish. This can take from a few minutes to a day, depending on your registrar.

Why does purging the cache not seem to work?

Purges can appear to fail when another cache still serves old pages, when the plugin's automatic purge is off, or when the browser is showing its own cached copy.

The plugin can purge Cloudflare's cache automatically when you publish or update content. Check that the automatic cache management option is on in the plugin settings.

Remember there are several caches:

CacheHow to clear
Cloudflare edgePlugin purge or Cloudflare dashboard
WordPress caching pluginThat plugin's clear button
Host server cacheHosting panel
BrowserTest in a private window

Clear them in order from the server outwards. Cloudflare's purge cache documentation explains the purge options in the dashboard. Our guide on how to clear cache in WordPress covers the WordPress side.

Why is APO not caching your pages?

APO only works when it is enabled for the zone and the plugin is installed, and pages are bypassed for logged-in users or visitors with certain cookies.

APO stores your HTML at Cloudflare's edge. It is included on some Cloudflare plans and available as a paid add-on on others, so check Cloudflare's current pricing.

To test APO:

  1. Log out of WordPress or use a private window
  2. Open your browser's developer tools and the Network tab
  3. Reload a page and click the first request
  4. Look at the response headers from Cloudflare

Headers such as cf-cache-status show whether the page came from cache. APO adds its own headers too.

If you see a bypass, a cookie or a no-cache header may be the reason. MDN's Cache-Control reference explains how those headers affect caching.

WooCommerce carts, membership plugins and logged-in sessions set cookies that bypass APO by design. That is expected and keeps private pages out of the cache.

If every page shows a bypass, look for a plugin that sets a cookie for all visitors, such as a consent or analytics plugin. Those cookies can stop APO caching pages for everyone.

Our review of whether Cloudflare APO is worth it for WordPress covers when it helps most.

Could another caching plugin conflict with Cloudflare?

Yes, a page caching plugin can work well with Cloudflare, but overlapping features such as two HTML caches or duplicate minification can cause stale pages or broken layouts.

Avoid doing the same job twice. If APO caches your HTML at the edge, your caching plugin's page cache still helps the first request, but settings that change HTML can clash.

Check for:

  • Minification turned on in both Cloudflare and your caching plugin
  • Rocket Loader in Cloudflare clashing with JavaScript delay in your plugin
  • Cache rules in Cloudflare that cache admin or cart pages

Turn off one side's overlapping feature and test. Our guide on Cloudflare cache rules for WordPress shows which paths to exclude.

Why do plugin settings fail to save?

Settings fail when the API key lacks permission for that setting, your plan does not include the feature, or your server cannot reach Cloudflare's API.

Some toggles only work on paid Cloudflare plans. If a setting flips back, check whether your plan includes it.

The plugin talks to Cloudflare's API from your server. If your host blocks outgoing requests or PHP is missing the cURL extension, calls fail quietly.

PHP's cURL documentation describes the extension. Your host can confirm it is enabled.

Could the plugin cause errors on your site?

Rarely, but an outdated plugin version, an old PHP version or a conflict can trigger PHP errors, so update everything and check the debug log.

Update the Cloudflare plugin, WordPress and PHP. Then enable debug logging as described in the WordPress debugging guide, reproduce the issue and read the log.

Site-wide errors such as 521, 522 or redirect loops are not caused by the plugin. They come from your server or SSL settings. See our guides on fixing Cloudflare error 521 and related errors.

Do you need the plugin at all?

Not always; Cloudflare works without the plugin, but the plugin is needed for APO automatic purges and makes cache purging on updates easier.

Without the plugin, you can still use Cloudflare's CDN, SSL and firewall. You would purge cache from the dashboard or through another plugin that supports Cloudflare.

If the plugin keeps causing trouble and you do not use APO, removing it is a reasonable choice. Make sure another tool handles cache purges, or set sensible cache rules so pages refresh on their own.

For a fuller comparison of what each plan includes, see Cloudflare Free vs Pro for WordPress.

Frequently asked questions

Why does the Cloudflare plugin reject my API key?

You may have pasted the wrong key type, such as an Origin CA key, or your API token lacks required permissions or is limited to another zone. Create a new token with the permissions in Cloudflare's guide.

Do I need the Cloudflare plugin to use Cloudflare?

No. Cloudflare's CDN, SSL and firewall work without it. The plugin adds easy cache purging on content updates and is needed for Automatic Platform Optimization to purge pages correctly.

Why is APO not caching my WordPress pages?

APO bypasses the cache for logged-in users and visitors with cookies such as cart or session cookies. Test logged out in a private window, and confirm APO is enabled for the zone and the plugin is active.

Can I use the Cloudflare plugin with WP Rocket or other caching plugins?

Yes, but avoid overlapping features. Turn off duplicate minification and JavaScript optimization in one of the two, and clear both caches after changes.

Why does the plugin say my domain is not found?

The WordPress Site Address does not match an active zone in the Cloudflare account you signed in with. Check for staging URLs, subdomains, pending nameservers or the wrong account.

Sources

  1. Cloudflare plugin WordPress.org Plugins
  2. Activate the Cloudflare WordPress plugin Cloudflare Docs
  3. Create an API token Cloudflare Docs
  4. Purge cache Cloudflare Docs
  5. Cache-Control MDN Web Docs
  6. Debugging in WordPress WordPress Developer Resources

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.