Documentation

Cloudflare integration

Connect an API token, deploy a cache rule, and keep Cloudflare purges in sync with WordPress changes.

WP Cache Pro includes a Cloudflare integration that can verify an API token, discover zone information, deploy or remove a cache rule, inspect rule status, and purge Cloudflare cache.

Connect Cloudflare

In the WP Cache Pro Cloudflare settings, add an API token with the permissions needed for the zone you want to manage. Use the built-in connection test before deploying a cache rule.

Prefer a scoped API token over a global API key. Limit it to the site and permissions required by the plugin.

Cache-rule behavior

The integration builds a Cloudflare cache expression with hard-coded exclusions for WordPress administration and other sensitive endpoints. Custom path exclusions can be added in the plugin settings.

If WooCommerce or another supported ecommerce integration is active, keep cart, checkout, account, and session-dependent traffic outside edge caching.

Purging

Local page-cache purges can trigger Cloudflare purges through the plugin’s wcp_after_cache_purge workflow. Content updates can also trigger targeted Cloudflare behavior.

From WP-CLI, you can request Cloudflare purging alongside the local cache:

wp wcp purge --cloudflare

For a specific page:

wp wcp purge --url=/about/ --cloudflare

Operational advice

Keep the WordPress page-cache exclusions and Cloudflare cache-rule exclusions aligned. When a page is personalized by cookies, sessions, logged-in state, ecommerce state, or another dynamic signal, it should not be treated as a globally cacheable HTML document.