{"id":402399,"date":"2026-11-14T06:14:52","date_gmt":"2026-11-14T06:14:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/edge-cache-security-for-cloudflare\/"},"modified":"2026-11-14T06:14:22","modified_gmt":"2026-11-14T06:14:22","slug":"edge-cache-security-for-cloudflare","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/edge-cache-security-for-cloudflare\/","author":15744905,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.5","requires_php":"8.1","requires_plugins":null,"header_name":"Edge Cache & Security for Cloudflare","header_author":"AzMarket","header_description":"Smart Page Cache with Cloudflare Cache Rules, Smart Purge, real visitor IP, Turnstile anti-spam and edge security rules.","last_updated":"2026-11-14 06:14:22","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/azmarket.net","rating":0,"author_block_rating":0,"active_installs":0,"downloads":58,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"azmarket","date":"2026-11-14 06:14:22","revision":3801448}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3801446,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3801446,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3801446,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3801446,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3801446,"resolution":"1","location":"assets","locale":"","width":1280,"height":1244},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3801446,"resolution":"2","location":"assets","locale":"","width":1280,"height":1714},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3801446,"resolution":"3","location":"assets","locale":"","width":1280,"height":1730},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3801446,"resolution":"4","location":"assets","locale":"","width":1280,"height":951},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3801446,"resolution":"5","location":"assets","locale":"","width":1280,"height":907},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3801446,"resolution":"6","location":"assets","locale":"","width":1280,"height":700},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3801446,"resolution":"7","location":"assets","locale":"","width":1280,"height":1244}},"screenshots":{"1":"Overview: Cloudflare connection, token permissions, visitor IP check and traffic for the last 24 hours with the cache hit ratio.","2":"Cache: Smart Page Cache rules on Cloudflare, cache duration, purge tools and the built-in cache check.","3":"Security: hardening presets, allowlist and blocklist, and the [CFEH] rules installed on Cloudflare.","4":"Turnstile: protect the login, registration, lost password, comment and WooCommerce forms.","5":"Logs with level, channel, text and date filters.","6":"Connection wizard: paste a scoped API token; the permissions each feature needs are listed.","7":"Dark theme."}},"plugin_section":[],"plugin_tags":[146,3882,7914,600,214603],"plugin_category":[52,54],"plugin_contributors":[169474],"plugin_business_model":[],"class_list":["post-402399","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-cloudflare","plugin_tags-purge","plugin_tags-security","plugin_tags-turnstile","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_contributors-azmarket","plugin_committers-azmarket"],"banners":{"banner":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/banner-772x250.png?rev=3801446","banner_2x":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/banner-1544x500.png?rev=3801446","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/icon-128x128.png?rev=3801446","icon_2x":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/icon-256x256.png?rev=3801446","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-1.png?rev=3801446","caption":"Overview: Cloudflare connection, token permissions, visitor IP check and traffic for the last 24 hours with the cache hit ratio."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-2.png?rev=3801446","caption":"Cache: Smart Page Cache rules on Cloudflare, cache duration, purge tools and the built-in cache check."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-3.png?rev=3801446","caption":"Security: hardening presets, allowlist and blocklist, and the [CFEH] rules installed on Cloudflare."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-4.png?rev=3801446","caption":"Turnstile: protect the login, registration, lost password, comment and WooCommerce forms."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-5.png?rev=3801446","caption":"Logs with level, channel, text and date filters."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-6.png?rev=3801446","caption":"Connection wizard: paste a scoped API token; the permissions each feature needs are listed."},{"src":"https:\/\/ps.w.org\/edge-cache-security-for-cloudflare\/assets\/screenshot-7.png?rev=3801446","caption":"Dark theme."}],"raw_content":"<!--section=description-->\n<p>Edge Cache &amp; Security for Cloudflare connects your WordPress site to the Cloudflare zone it already uses, with a scoped API token. It sets up Cloudflare features for you and keeps them in sync with your content.<\/p>\n\n<h4>Smart Page Cache<\/h4>\n\n<ul>\n<li>Installs two Cloudflare Cache Rules: pages are cached at the edge for visitors without a login or cart, while admin pages, logged-in users, previews, the REST API and other dynamic requests go to your server.<\/li>\n<li>Choose how long pages stay in the Cloudflare cache. The plan minimum is respected.<\/li>\n<li>A built-in cache check requests your pages as a visitor and explains the <code>cf-cache-status<\/code> result.<\/li>\n<li>Only rules whose name starts with <code>[CFEH]<\/code> are ever created, changed or removed. Your own rules are left alone.<\/li>\n<\/ul>\n\n<h4>Smart Purge<\/h4>\n\n<ul>\n<li>When you publish, update or delete content, the changed page and related pages (home, archives, feeds, sitemap) are purged.<\/li>\n<li>Purges are batched and sent after the change, never during a normal visitor page view.<\/li>\n<li>Purge single URLs or the whole zone from the dashboard, the admin bar or WP-CLI.<\/li>\n<\/ul>\n\n<h4>WooCommerce<\/h4>\n\n<ul>\n<li>Cart, checkout and My Account pages, and visitors with a cart or session cookie, always bypass the cache.<\/li>\n<li>Product, variation, stock, price and scheduled sale changes trigger a purge.<\/li>\n<\/ul>\n\n<h4>Real visitor IP<\/h4>\n\n<ul>\n<li>Restores the visitor IP from the <code>CF-Connecting-IP<\/code> header, only when the request really comes from a Cloudflare address. The Cloudflare IP list is bundled with the plugin and, once you connect your zone, refreshed weekly.<\/li>\n<\/ul>\n\n<h4>Turnstile anti-spam<\/h4>\n\n<ul>\n<li>Cloudflare Turnstile on the login, registration, lost password and comment forms, and on WooCommerce My Account and checkout forms.<\/li>\n<li>Choose what happens if Cloudflare cannot be reached: allow the form and log a warning (default), or reject it.<\/li>\n<\/ul>\n\n<h4>Edge security<\/h4>\n\n<ul>\n<li>Hardening presets as Cloudflare WAF custom rules: block XML-RPC, challenge the login page, block user enumeration, block probes for sensitive files.<\/li>\n<li>Allowlist and blocklist for IP addresses and ranges. Your own IP, Cloudflare addresses and private ranges cannot be blocked, and your IP is added to the allowlist when you connect.<\/li>\n<li>The dashboard shows each rule's expression and how many custom rules your plan allows.<\/li>\n<\/ul>\n\n<h4>Dashboard, logs and safe mode<\/h4>\n\n<ul>\n<li>Overview with requests and cache hit ratio for the last 24 hours (from Cloudflare analytics, when your plan and token allow it), security event counts and the last purge.<\/li>\n<li>Logs with filters for API calls, purges, cache and security events. Entries are deleted after 30 days by default.<\/li>\n<li>Safe mode pauses purges, cache headers and Turnstile checks with one click or with <code>define( 'CFEH_SAFE_MODE', true );<\/code>.<\/li>\n<li>Light and dark themes. All assets are bundled with the plugin.<\/li>\n<\/ul>\n\n<h4>WP-CLI<\/h4>\n\n<pre><code>wp cfeh status, `wp cfeh purge --all|--urls=&lt;urls&gt;`, `wp cfeh rules install|remove|status`, `wp cfeh diagnose`, `wp cfeh safe-mode on|off`, `wp cfeh ip allow|unallow &lt;ip&gt;`.\n<\/code><\/pre>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to services provided by Cloudflare, Inc.<\/p>\n\n<h4>Cloudflare API (api.cloudflare.com)<\/h4>\n\n<p>Used to verify your API token, find your zone, create and remove the cache and security rules made by this plugin, purge cached pages, read traffic analytics for the dashboard (GraphQL Analytics API) and refresh the list of Cloudflare IP addresses. Requests are sent from your server only when you use the plugin dashboard or WP-CLI, when content changes require a purge, and from scheduled background tasks (weekly IP list refresh, retried purges). Nothing is sent to Cloudflare until you connect a zone with your API token; activating the plugin makes no external request. They are never sent during a normal visitor page view. Data sent: your API token (as an authorization header), your zone id, rule definitions (which may include IP addresses you add to the allowlist or blocklist) and the URLs of pages to purge.<\/p>\n\n<ul>\n<li>Terms: https:\/\/www.cloudflare.com\/website-terms\/<\/li>\n<li>Privacy policy: https:\/\/www.cloudflare.com\/privacypolicy\/<\/li>\n<\/ul>\n\n<h4>Cloudflare Turnstile (challenges.cloudflare.com)<\/h4>\n\n<p>Only when you enable Turnstile and choose forms to protect. The Turnstile script is loaded from challenges.cloudflare.com on pages that show a protected form, and runs in the visitor's browser. When the form is sent, your server sends the Turnstile token, your secret key and the visitor IP address to challenges.cloudflare.com to check it.<\/p>\n\n<ul>\n<li>Terms: https:\/\/www.cloudflare.com\/website-terms\/<\/li>\n<li>Privacy policy: https:\/\/www.cloudflare.com\/turnstile-privacy-policy\/<\/li>\n<\/ul>\n\n<h4>Your own site<\/h4>\n\n<p>The cache check on the Cache tab requests your own home page and latest post (and a WooCommerce product page, if any) from your server, as an anonymous visitor and with a test cookie, to read the cache status headers. No data is sent to third parties.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>In Cloudflare, create a Custom API Token (My Profile &gt; API Tokens) limited to your site's zone. The dashboard lists the permissions each feature needs; \"Zone &gt; Zone &gt; Read\" is required.<\/li>\n<li>Open Edge Cache &amp; Security in the WordPress admin, paste the token and follow the wizard.<\/li>\n<li>On the Cache tab, click \"Install cache rules\".<\/li>\n<\/ol>\n\n<p>You can also define the token in wp-config.php: <code>define( 'CFEH_API_TOKEN', '...' );<\/code>. It then cannot be changed from the dashboard.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20cloudflare%20credentials%20does%20it%20use%3F\"><h3>Which Cloudflare credentials does it use?<\/h3><\/dt>\n<dd><p>A scoped Cloudflare API Token only. The Global API Key is not supported. The token is stored encrypted and is never shown again after you save it; only its last four characters are displayed.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20another%20page%20cache%20plugin%3F\"><h3>Does it work with another page cache plugin?<\/h3><\/dt>\n<dd><p>It can, but running two page caches or two Cloudflare integrations can cause stale pages or duplicate purges. The Cache tab warns you when it detects one.<\/p><\/dd>\n<dt id=\"will%20it%20change%20my%20existing%20cloudflare%20rules%3F\"><h3>Will it change my existing Cloudflare rules?<\/h3><\/dt>\n<dd><p>No. It only creates and manages rules whose description starts with <code>[CFEH]<\/code>. It adds its rules after yours and re-reads the rule list before every change.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20cloudflare%20is%20unreachable%3F\"><h3>What happens if Cloudflare is unreachable?<\/h3><\/dt>\n<dd><p>Nothing is blocked. Purges are retried later, Turnstile follows the failure mode you chose (allow by default), and errors are logged.<\/p><\/dd>\n<dt id=\"i%20locked%20myself%20out.%20what%20now%3F\"><h3>I locked myself out. What now?<\/h3><\/dt>\n<dd><p>Add <code>define( 'CFEH_SAFE_MODE', true );<\/code> to wp-config.php. Turnstile checks stop at once. Edge security rules live on Cloudflare: remove them on the Tools tab, with <code>wp cfeh rules remove<\/code>, or in the Cloudflare dashboard (Security &gt; WAF &gt; Custom rules, names starting with <code>[CFEH]<\/code>).<\/p><\/dd>\n<dt id=\"does%20uninstalling%20remove%20the%20rules%20from%20cloudflare%3F\"><h3>Does uninstalling remove the rules from Cloudflare?<\/h3><\/dt>\n<dd><p>No. Uninstalling removes local data only (settings, logs, scheduled tasks). Use \"Remove [CFEH] rules\" on the Tools tab first if you want the rules gone.<\/p><\/dd>\n<dt id=\"does%20it%20support%20wordpress%20multisite%3F\"><h3>Does it support WordPress Multisite?<\/h3><\/dt>\n<dd><p>Not yet. On a Multisite network the plugin shows a notice and stays inactive.<\/p><\/dd>\n<dt id=\"which%20data%20does%20it%20store%20about%20visitors%3F\"><h3>Which data does it store about visitors?<\/h3><\/dt>\n<dd><p>Log entries can contain visitor IP addresses and browser user agents (for example, failed logins or blocked form submissions). They are stored in your WordPress database and deleted after the retention period. A suggested text is added to the Privacy Policy guide.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release: connection wizard, Smart Page Cache with Cache Rules, Smart Purge, WooCommerce bypass, real visitor IP, Turnstile, hardening presets, IP allowlist and blocklist, logs, overview analytics, safe mode and WP-CLI.<\/li>\n<\/ul>","raw_excerpt":"Cloudflare page caching with automatic purge, real visitor IP, Turnstile anti-spam and edge security rules, from one dashboard.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/402399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=402399"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/azmarket"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=402399"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=402399"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=402399"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=402399"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=402399"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=402399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}