The Cache Purger

Description

The Cache Purger takes the headache out of cache management. Instead of juggling a dozen different cache-clearing buttons across your stack, this plugin hooks into WordPress actions and fires them all at once — automatically, on a schedule, or with a single click from the admin bar.

It covers the full spectrum: popular caching plugins, managed hosting environments, PHP-level caches (OPcache, APC, WinCache), server-level caches (Nginx, Varnish, PageSpeed), in-memory stores (Redis, Memcache, Memcached), and external CDN/WAF APIs (Cloudflare, Sucuri, Fastly).

Every purge is configurable. Choose which cache types to include, which WordPress events should trigger a purge, and which specific posts, pages, CPTs, or field groups to exclude. You can also run purges on a WP Cron schedule, or kick one off manually via WP-CLI.

What Gets Purged

Caching Plugins

Flying Press, SiteGround Optimizer, Nginx Helper, LiteSpeed Cache, Cachify, Autoptimize, Fast Velocity Minify, WP Rocket, Swift Performance, Comet Cache, Hummingbird, WP Fastest Cache, WP Super Cache, W3 Total Cache, Hyper Cache, WP-Optimize, Cache Enabler, NitroPack, Divi, Elementor, WP REST Cache, and more.

Hosting Environments

WP Engine, Kinsta, GoDaddy Managed WordPress, Pantheon, Bluehost, Cloudways (Breeze), SiteGround, RunCloud, SpinupWP.

Some of these rely on the host’s companion plugin being installed. Check with your provider if you’re unsure.

Server & PHP Caches

Zend OPcache, APC/APCu, WinCache, XCache, Nginx (fastcgi/proxy cache), PageSpeed Module, Varnish, static file caches.

Memory Stores

Redis, Memcache, Memcached — with support for remote servers, authentication, per-database flushing, and prefix/key-scoped clearing.

CDN & WAF APIs

Cloudflare (full cache purge via API token), Sucuri WAF, Fastly CDN.

WordPress Built-In

Object cache, options cache, transients, persistent object cache.

Purge Triggers

Configure purges to fire automatically on any combination of the following WordPress events:

  • Post save / update / trash
  • Page save / update / trash
  • Custom Post Type save / update / trash
  • Taxonomy / term save / delete
  • Category save / delete
  • Menu save / delete
  • Widget save / delete
  • Customizer save
  • GravityForms form save / trash (requires GravityForms)
  • Advanced Custom Fields field group save / trash (requires ACF)
  • WooCommerce settings save (requires WooCommerce)
  • Plugin activation / deactivation
  • Core / plugin / theme updates
  • Plugin settings save (this plugin’s own settings page)

Exclusion lists are available for posts, pages, CPTs, GravityForms forms, and ACF field groups — so you can carve out anything that shouldn’t trigger a purge.

Additional Features

  • Admin bar button — Master Cache Purge available on every admin page, one click from anywhere.
  • Purge log — Optional logging of every purge action to wp-content/purge.log, viewable directly in the settings UI with a one-click clear.
  • Scheduled purges — WP Cron / Action Scheduler integration with any built-in schedule.
  • Scheduled log clearing — Keep your log file tidy on its own schedule.
  • Export / Import settings — Move your configuration between sites in seconds.
  • Multisite aware — Cannot be network-activated by design; activate per-subsite for granular control.

Screenshots

  • Settings — General purge configuration and trigger options
  • Settings — GravityForms and ACF options (shown when those plugins are active)
  • API/Server Settings — Remote Redis, Memcache, Memcached, and CDN/WAF API keys
  • CRON Action Settings — Scheduled purge and log clearing configuration

Installation

  1. Download the plugin, unzip it, and upload to your site’s /wp-content/plugins/ directory.
    • Alternatively, upload the zip directly via Plugins > Add New > Upload Plugin.
    • Or search for “The Cache Purger” in the WordPress Plugin Repository and install from there.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to The Cache Purge in your admin menu to configure settings.

Requirements: PHP 8.2 or higher. WordPress 6.0 or higher.

FAQ

Why would I need this plugin?

If you find yourself manually clearing caches in multiple places after every site update — or if you want to automate that process entirely — this plugin handles it all from one settings screen. It’s especially useful on sites with complex stacks: a CDN in front, a caching plugin active, and a server-level cache underneath.

Which cache types are purged by default?

On a fresh install, Plugin Caches, WordPress Caches, Server Caches, and Memory Caches are all enabled. API/CDN caches (Cloudflare, Sucuri, Fastly) are opt-in, since they require API credentials.

How do I set up Cloudflare, Sucuri, or Fastly purging?

Go to The Cache Purge > API/Server Settings, enter your credentials, and make sure “API Caches” is included in your Caches To Purge selection on the Settings tab.

How do I configure remote Redis, Memcache, or Memcached servers?

Also under API/Server Settings. Enable the relevant toggle, then add your server IP(s), port(s), and any authentication or database details. Multiple servers are supported.

Can I exclude specific posts or pages from triggering a purge?

Yes. When you enable purging for posts, pages, or CPTs, an exclusion selector appears below it. Any content selected there will be ignored when saved or updated.

How do I run a purge from the command line?

wp the_cache purge

Add --allow-root if running as root. On a multisite, add --url=https://yoursite.com to target a specific subsite.

Why can’t this plugin be network-activated on a multisite?

By design. Activating per-subsite gives each site its own independent configuration, which is almost always what you want in a multisite environment.

Where is the purge log stored?

At {ABSPATH}wp-content/purge.log. Enable logging under Settings > Log Purge Actions? and it will be viewable directly in the The Purge Log tab. You can clear it manually from that tab, or set it to auto-clear on a schedule under CRON Action Settings.

Reviews

March 23, 2026 1 reply
We use this plugin on over 150 sites to keep caches cleared, including Cloudflare. Been working great, had an issue briefly, associated with a particular “unusual” hosting platform. Asked developer about it and he fixed it within a week! Plugin clears all kinds of caches: OP cache, object cache, server caches. If you’ve been using the Cloudflare plugin to keep that cache cleared, particularly when developing, you won’t need it anymore as this plugin communicates directly with Cloudflare via API. Highly recommended plugin; invaluable in this day where we have multiple caches that can cause issues with maintaining fresh data for clients.
January 15, 2026 1 reply
Massively buggy. A bunch of cdn image try to load at the admin settings page and it loads and crashes right away. i finally got that to stop by just removing the cdn stuff from the plugin file and then found there isn’t actually a setting for bluehost :/big waste of time. but a good idea in theory.
October 28, 2025 5 replies
Hi Right after the first click in the settings page, everything disappears, so I couldn’t use the plugin at all as I couldn’t set up anything.
July 11, 2024 1 reply
This plugin, in tandem with WP Rocket on WordPress.com hosting (Business Plan), does a deeper and more effective purge of my site’s cache. Sure, WP Rocket has its own purge, but it does not go as deep. This plugin really does assist in making things right. Thank you 🙏
January 25, 2023 1 reply
I have been using this plugin for over 18 months and it does eactly what it says on the tin! About 4 weeks ago It stopped working due to server upgrades on my web hosting platform. The developer was very quick to respond to my issue and helped me through a minefield to the point where it is once again working. If you need your Cache purged on a regular basis…look no further
Read all 5 reviews

Contributors & Developers

“The Cache Purger” is open source software. The following people have contributed to this plugin.

Contributors

Translate “The Cache Purger” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.2.86

  • Update: Cloudflare plugin clearing
    • Namespace update
  • Update: Screenshots

2.2.78

  • Upgrade: Fastly CDN library
  • Swap: Settings framework
  • Update: Menu names
  • Add: Log purge to top menu
  • Fix: Manual purge’s security

2.1.63

  • Bump: Minimum PHP version to 8.2
  • Bump: Minimum WordPress version to 6.0
  • Upgrade: Fastly CDN library
  • Fix: GoDaddy cache purge not logging on scheduled/repeat purges
  • Fix: Nginx cache purge pre-action hook
  • Fix: Typo in SiteGround cache purge log call
  • Fix: Sucuri API purge guard
  • Fix: Varnish purge

2.1.36

  • Update: Vendor libraries
  • Bump: Minimum PHP version to 8.1
  • Remove: WP-CLI cache clearing
  • Restructure: Common functionality for better organization and slightly improved purge performance
  • Add: Redis prefix/key scoped flushing
  • Fix: Redis database-scoped flush
  • Fix: load_textdomain deprecation notice

2.1.01

  • Verify: WordPress 6.9 compatibility
  • Verify: PHP 8.4 compatibility
  • Add: Redis database ID and authentication support
  • Update: Fastly CDN library
  • Update: Action Scheduler library
  • Add: Admin notice for sites running PHP 8.0 or lower

2.0.11

  • Add: SpinUpWP hosting support
  • Update: Documentation
  • Update: Fastly CDN library
  • Update: Action Scheduler library
  • Fix: Action Scheduler calls for background purge jobs
  • Fix: Footer link

1.9.89

  • Verify: WordPress 6.7 compatibility
  • Fix: Null check for purge type configuration
  • Add: Fastly CDN purge support
  • Replace: WP Cron with WooCommerce Action Scheduler for more reliable background processing
  • Add: New action hooks — tcp_cron_cache_purge, tcp_cron_log_purge, tcp_long_cache_purge

1.9.27

  • Verify: WordPress 6.6 compatibility
  • Add: Flying Press plugin cache support
  • Add: Setting to select which cache types are purged
  • Add: Selfless plug

1.8.01

  • Verify: PHP 8.3 compatibility
  • Fix: PHP 8.x compatibility and deprecation notices
  • Update: Framework JS libraries

1.7.33

  • Verify: WordPress 6.5 compatibility
  • Update: Minimum WordPress version to 5.6

1.7.12

  • Fix: Missing variable on activation

1.7.11

  • Optimize: Class loading via Composer autoloader
  • Update: JS libraries (CodeMirror, Leaflet, etc.)
  • Patch: PHP 8.2 deprecation notices

1.6.04

  • Verify: WordPress 6.3 compatibility

1.6.03

  • Fix: Warning for OPcache scripts
  • Fix: Fatal error on log clearing in PHP 8+

1.5.99

  • Verify: WordPress 6.2 compatibility
  • Fix: Cron schedule check
  • Fix: File cache clearing could cause a fatal error in some environments
  • Fix: Long purge actions moved from admin-ajax to a one-time WP Cron job

1.5.22

  • Fix: File cache clearing — better performance, suppresses warnings

1.5.12

  • Add: Option to clear caches on plugin settings save
  • Add: Purge log viewer tab in settings UI
  • Add: Manual and cron-based log clearing
  • Fix: tcp_post_purge hook
  • Add: Pure Varnish purging support
  • Update: Move Varnish and PageSpeed purging to admin-ajax for better wp-admin performance

1.4.02

  • Verify: WordPress 6.1.2 compatibility
  • Update: Settings field framework
  • Fix: Purging action exclusions
  • Update: Exclusion field labelling

1.3.11

  • Fix: WP-Optimize static call to non-static method in PHP 8+
  • Fix: Nginx cache purging — more path detection, more efficient clearing
  • Fix: File cache purging — more efficient clearing
  • Fix: Cloudflare and Sucuri purges — only attempt if API credentials are present
  • Fix: Master Purge admin bar link positioning

1.2.79

  • Fix: NitroPack purge AJAX response causing page redirect

1.2.66

  • Add: NitroPack cache purge support
  • Add: XCache purge support
  • Update: Module structure
  • Update: Logging actions

1.1.01

  • Verify: WordPress 6.0 compatibility
  • Verify: PHP 8.1 compatibility
  • New: Plugin icon
  • Update: Settings field framework

1.0.27

  • Add: WP Cron-based scheduled cache purging with configurable schedules
  • Add: WP-CLI purge command (wp the_cache purge)
  • Fix: Sucuri purge logging
  • Fix: Network activation guard
  • Fix: Master Purge showing in network admin
  • Fix: PageSpeed purge performance
  • Fix: OOM issue on WooCommerce sites with large product catalogs
  • Add: WP REST Cache purge support

0.8.88

  • Add: Translation readiness (text domain: the-cache-purger)
  • Add: Minified asset compilation with debug-mode detection

0.8.09

  • Add: Elementor CSS auto-regeneration
  • Add: Divi cache purge
  • Update: W3 Total Cache, WP Super Cache, Hummingbird, Cache Enabler, LiteSpeed Cache, Kinsta, Autoptimize, WP-Optimize clearing
  • Add: SiteGround, Bluehost, Cloudways (Breezeway) hosting cache purge

0.7.16

  • Fix: Settings conflict with another plugin
  • Add: Remote Redis, Memcache, Memcached server configuration
  • Add: Direct Cloudflare and Sucuri API clearing

0.4.15

  • Add: Manual Cache Purge button

0.3.98

  • Initial feature build — purging methods, settings, documentation, export/import

0.1.01

  • Initial release