A comprehensive WordPress plugin that automatically purges all server-side caching methods when your website content changes. This plugin eliminates the need to manually clear caches across multiple systems by providing a unified solution for cache management.
The Cache Purger attempts to purge all server-side caching methods including the most common caching plugins, hosting-based caches, server-based caches, built-in WordPress object caches, and simple file-based caches. When you update content on your WordPress site, this plugin automatically clears all relevant caches to ensure visitors see the latest version immediately.
Caching Plugins
- 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
- Flying Press
- Elementor (CSS Auto-Regenerate)
- Divi Cache
- Breeze
Hosting & CDN Providers
- WPEngine
- Kinsta
- GoDaddy Managed WordPress
- Pantheon
- Bluehost
- Cloudways
- SiteGround
- RunCloud
- Fastly CDN
- SpinUpWP
- Cloudflare (Direct API)
- Sucuri (Direct API)
Note: Some hosting integrations may depend on separate plugins or configurations.
Server-Based Caches
- PHP FPM
- Zend Opcache
- APC and APCU
- WinCache
- PageSpeed Module
- Nginx
- Static File Caches
- Redis (with database ID and authentication support)
- Memcache
- Memcached
- Varnish
- XCache
WordPress Built-in
- WordPress object caching
- Persistent object caching
- WP REST Cache
Cache purging is configurable and triggers on the following actions:
- Content Updates: Posts, Pages, Custom Post Types
- Taxonomy Changes: Categories, Tags, Custom Taxonomies
- Site Structure: Widgets, Menus
- System Changes: Plugin updates, Settings & Options changes
- Plugin Integration:
- Gravity Forms (if installed)
- Advanced Custom Fields (if installed)
- WooCommerce Settings (if installed)
- Manual Purging: Clear caches on-demand from the admin interface
- WP-CLI Support: Clear caches via command line interface
- Background Processing: Uses WooCommerce Action Scheduler for efficient processing
- Logging: Optional logging of purge activities with cron-based log clearing
- Selective Purging: Choose which types of caches to purge
- API Integration: Direct integration with CDN and security services
- Translation Ready: Fully internationalized with text domain
the-cache-purger
- Navigate to Plugins > Add New in your WordPress dashboard
- Search for "The Cache Purger"
- Click Install Now and then Activate
- Download the plugin zip file
- Upload and extract to
/wp-content/plugins/the-cache-purger/ - Activate the plugin through the Plugins menu in WordPress
- Download the plugin zip file
- Go to Plugins > Add New > Upload Plugin
- Choose the zip file and click Install Now
- Activate the plugin
After activation, configure the plugin through the WordPress admin:
- Navigate to the plugin settings page
- General Settings: Configure which events trigger cache purging
- Cache Types: Select which caching systems to purge
- API Settings: Configure credentials for CDN and remote cache services
- Logging: Enable/disable activity logging
- Manual Purge: Use the master purge button for immediate cache clearing
For services requiring API credentials:
- Cloudflare: Enter your API key and zone information
- Sucuri: Provide API credentials
- Fastly CDN: Configure API key and service ID
- Redis: Set database ID, authentication, and key prefix
- Remote Memcache/Memcached: Configure connection details
Once configured, the plugin automatically purges relevant caches when:
- You publish or update posts/pages
- You modify widgets or menus
- You change plugin settings
- Supported plugins (Gravity Forms, ACF, WooCommerce) are updated
- Use the Master Purge button in the plugin settings
- Purge individual cache types as needed
- Monitor purge activity through the logging interface
Clear all caches via command line:
wp the_cache purgeAdditional CLI Options:
- For root users:
wp the_cache purge --allow-root - For multisite networks:
wp the_cache purge --url=https://yoursite.com
Note: CLI functionality was removed in version 2.1.36 but may be reinstated in future versions.
- WordPress: 5.6 or higher
- PHP: 8.1 or higher (8.4 compatible)
- WordPress Version Tested: Up to 6.9
If you need to manually clear server-side caches every time you modify your site, or want to automate cache clearing, this plugin is for you. It provides a "set it and forget it" solution for cache management.
The plugin supports most major WordPress hosting providers. Check the features list above for your specific host. Some integrations may require additional plugins or configurations.
Yes! The plugin includes settings to select which types of caches should be purged, giving you granular control over the purging process.
The plugin uses WooCommerce's Action Scheduler to handle purging in the background, minimizing impact on your site's performance. Long-running purge operations are handled via WordPress cron jobs.
Yes, the plugin is compatible with WordPress multisite installations.
NitroPack has its own methodology for clearing and managing most server-based caches. As a result, we cannot log items that NitroPack removes, overwrites, manages, or flushes during its purge processes.
The Fastly CDN integration may generate PHP 8 notices about Dynamic Properties. This is a known issue with the Fastly library that will be resolved when Fastly updates their code.
- Long purge operations are moved to background processing to avoid admin interface slowdowns
- Cron-based scheduling prevents performance issues during high-traffic periods
- Logging can be disabled to improve performance if detailed purge tracking isn't needed
- β¬οΈ PHP 8.1 minimum requirement
- π Updated vendor libraries
- β Removed CLI clearing functionality
- ποΈ Restructured common functionality for better performance
- β Added Redis prefix/key support
- π Fixed Redis database flush issues
- β WordPress Core 6.9 compatibility
- β PHP 8.4 compatibility verified
- β Added Redis database ID and authentication support
- π Updated Fastly CDN and Action Scheduler libraries
β οΈ Added notice for PHP 8.0 and lower versions
- β Added SpinUpWP support
- π Updated documentation and libraries
- π Fixed Action Scheduler background job calls
- β Added Fastly CDN purge support
- π Replaced WordPress cron with WooCommerce Action Scheduler
- β Added new hooks:
tcp_cron_cache_purge,tcp_cron_log_purge,tcp_long_cache_purge
- β Added Flying Press plugin support
- β New setting for selecting cache types to purge
For complete changelog, see the plugin's WordPress.org page.
The plugin provides numerous action hooks for developers:
General Hooks
tcp_pre_purge- Fires before any purging beginstcp_post_purge- Fires after all purging is complete
Specific Cache Type Hooks
tcp_pre_hosting_purge/tcp_post_hosting_purgetcp_pre_plugin_purge/tcp_post_plugin_purgetcp_pre_wp_purge/tcp_post_wp_purgetcp_pre_php_purge/tcp_post_php_purgetcp_pre_pagespeed_purge/tcp_post_pagespeed_purgetcp_pre_nginx_purge/tcp_post_nginx_purgetcp_pre_file_purge/tcp_post_file_purge
Cron Hooks
tcp_cron_cache_purge- Fires when cron cache purge is scheduledtcp_cron_log_purge- Fires when cron log purge is scheduledtcp_long_cache_purge- Fires when long cache purge is executed
For general support questions, please visit the WordPress.org plugin support forum.
For complex configurations or professional assistance, contact the developer at: https://kevp.us/contact
The Cache Purger is open source software. Contributions are welcome!
- Browse the code: Plugin Trac
- SVN Repository: The Cache Purger SVN
- Development Log: RSS Feed
Help translate the plugin into your language at WordPress Translate.
This plugin is licensed under the GPL v2 or later.
Performance Tip: This plugin works best when you configure only the cache types you actually use. Unnecessary purging operations can be disabled in the settings to optimize performance.
Compatibility Note: While this plugin attempts to support as many caching systems as possible, some hosting providers may have unique implementations. If you experience issues, contact your hosting provider to confirm cache clearing methods and any required additional plugins.