Tidy Cache Purge — Cloudflare & Nginx FastCGI

Automatically purge the Cloudflare edge cache and the Nginx FastCGI cache whenever you publish, update, or delete content — so what you publish is what visitors see.

Coming soon See features

Launching soon on WordPress.org — check back shortly.

Coming soon

Tidy Cache Purge — Cloudflare & Nginx FastCGI is on the way

We're putting the finishing touches on this plugin. It isn't available for download yet — explore the features below, and it will land on WordPress.org soon.

Features

Purges the Cloudflare edge cache via the official API
Full-zone or targeted URL purge modes
Flushes the local Nginx FastCGI cache directory
Triggers automatically on publish, update, unpublish, and delete
Choose which post types are watched
"Purge everything now" button in the settings page
wp tidy-cache-purge flush WP-CLI command
Cloudflare token via database or TCPURGE_CF_TOKEN constant
Purges coalesced per request and deferred to shutdown
Safety guard on the FastCGI cache directory
No external service beyond your own Cloudflare account
100% free — no Pro version, no upsells

How it works

Free WordPress cache purge plugin for Cloudflare and Nginx FastCGI. Clears both cache layers automatically on publish, update, unpublish, and delete. Full-zone or targeted Cloudflare purges, one-click manual purge, and a WP-CLI command. No external service beyond your own Cloudflare account.

Cloudflare Edge Purge

Clears the Cloudflare edge cache through the official API the moment content changes. Choose a full-zone purge or a targeted purge of just the affected URLs.

Nginx FastCGI Flush

Flushes the local Nginx FastCGI page cache directory so anonymous visitors immediately see fresh content instead of a stale cached page.

Automatic Triggers

Runs automatically on publish, update, unpublish, and delete. No manual step, no cron to configure — the cache clears as soon as you save.

Watched Post Types

Pick exactly which post types trigger a purge, so unrelated content changes never invalidate your cache unnecessarily.

One-Click Manual Purge

A "Purge everything now" button on the settings page clears both layers on demand — handy after a theme change or a bulk edit.

WP-CLI Command

Trigger a full purge from the command line with wp tidy-cache-purge flush — perfect for deploy scripts and server-side automation.

Coalesced & Deferred

Purges are coalesced per request and deferred to shutdown, after the response is sent. Saving a post never waits on the Cloudflare API, and bulk edits trigger a single purge.

Secure Token Handling

Store your Cloudflare token in the database or define it as a TCPURGE_CF_TOKEN constant. The saved token is never rendered back into the settings field.

See it in action

yoursite.com/wp-admin/post.php
WordPress 6.0+ PHP 8.2+ Gutenberg native GPL v2+

Frequently Asked Questions

Do I need both cache layers?

No. Disable either one in the settings if you only use Cloudflare or only the Nginx FastCGI page cache. Tidy Cache Purge works with either layer on its own or both together.

Where do I get a Cloudflare API token?

In the Cloudflare dashboard, go to My Profile → API Tokens → Create Token → Custom Token, and grant the permission Zone → Cache Purge → Purge scoped to your zone(s).

Is the FastCGI purge targeted?

The FastCGI cache is always flushed in full. Matching a single cache key is unreliable because it depends on scheme, host, and trailing slash, and a full flush is cheap and dependable. Cloudflare purges can be full or targeted.

Does saving a post slow down while it purges?

No. Purges are coalesced per request and deferred to shutdown, so they run after the response is sent to the browser. Bulk operations trigger a single purge instead of one per item.

Does it use any external service?

Only your own Cloudflare account, via the official Cloudflare API. There is no third-party middleman — the plugin talks directly to Cloudflare and to your local FastCGI cache directory.

Can I run a purge from the command line?

Yes. The plugin registers a wp tidy-cache-purge flush WP-CLI command that clears both layers, which is ideal for deploy scripts and scheduled server-side automation.

Why Cache Purging Matters

If your site sits behind Cloudflare and/or an Nginx FastCGI page cache, freshly published or edited content can stay hidden from anonymous visitors until the cache naturally expires. That delay is confusing for editors ("I published it, why can't I see it?") and costly when you're fixing a typo, correcting a price, or pushing a time-sensitive update. Tidy Cache Purge closes the gap by clearing both cache layers automatically the moment content changes — so what you publish is what visitors see.

The plugin hooks into the WordPress publish, update, unpublish, and delete events and clears the Cloudflare edge cache through the official API, then flushes the local Nginx FastCGI cache directory. You decide which post types are watched, whether Cloudflare purges are full-zone or targeted to the affected URLs, and whether one or both layers are active. A "Purge everything now" button and a wp tidy-cache-purge flush WP-CLI command let you clear everything on demand — after a theme change, a plugin update, or a bulk edit.

Built to Stay Out of the Way

Cache purging should never make saving a post feel slow. Tidy Cache Purge coalesces purges per request and defers them to shutdown, after the response has already been sent to the browser — so editors never wait on the Cloudflare API, and a bulk operation triggers a single purge instead of dozens. For security, your Cloudflare token can live in the database or be defined as a TCPURGE_CF_TOKEN constant, the saved token is never echoed back into the settings field, and the FastCGI cache directory is guarded so it can never be pointed at a system directory or the WordPress install. No external service is involved beyond your own Cloudflare account.

Tidy Cache Purge — Cloudflare & Nginx FastCGI is coming soon

Not available for download yet — it will launch on WordPress.org soon.