Home Plugins anticache
Anti-Cache Emergency Kit logo

Anti-Cache Emergency Kit

by Fernando Tellado on WordPress.org

Instantly disables all caches, enables debug mode, and provides maintenance mode for safe WordPress development and troubleshooting.

(2)
Plugin activation notice showing all performed actions

Plugin activation notice showing all performed actions

Anti-Cache Emergency Kit is the ultimate tool for WordPress developers and designers who need to bypass all caching mechanisms during development, testing, or troubleshooting.

⚠️ Development Tool Only – Do NOT leave active on production sites!

Key Features

🔧 Comprehensive Cache Management
* Automatically detects and flushes major cache plugins
* Temporarily deactivates cache plugins during development (user can easily reactivate)
* Clears object cache (Redis, Memcached)
* Clears OPcache and hosting-specific caches
* Prevents browser caching for administrators

🛠 Debug Mode Activation
* Creates automatic backup of wp-config.php before any changes
* Safely modifies wp-config.php using WordPress Filesystem API
* Automatically enables WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY
* Disables WordPress cache (WP_CACHE = false)
* Shows PHP errors and warnings for troubleshooting
* Automatically restores original wp-config.php on deactivation

🛠️ Maintenance Mode
* Optional simple maintenance screen for non-logged users
* Prevents visitors from seeing development errors
* Quick toggle from admin bar
* Customizable maintenance message

Admin-Only Impact
* All anti-cache measures only affect logged-in administrators
* Regular visitors see the normal cached site (unless maintenance mode is enabled)
* Perfect for live site development

Smart Management Panel
* View current status and active features
* Easy one-click reactivation of cache plugins
* Manual cache clearing options
* Clear overview of what was changed

Supported Cache Plugins

  • WP Rocket
  • W3 Total Cache
  • WP Super Cache
  • WP Fastest Cache
  • LiteSpeed Cache
  • SiteGround Optimizer
  • WP Optimize
  • Hummingbird (WPMU DEV)
  • Breeze (Cloudways)
  • Autoptimize
  • Cache Enabler
  • Surge
  • Redis Object Cache

Supported Hosting Caches

  • SiteGround hosting cache
  • Cloudflare (when plugin is active)
  • Generic hosting cache systems

How It Works

  1. Backup: Creates automatic backup of wp-config.php
  2. Activation: Automatically flushes and deactivates all detected cache plugins
  3. Debug Mode: Enables WordPress debug mode and disables WP_CACHE in wp-config.php
  4. Anti-Cache Headers: Sends no-cache headers to admin users
  5. Asset Versioning: Adds random versions to CSS/JS files for admins
  6. Maintenance Mode: Optional simple screen for non-logged users
  7. Deactivation: Restores original wp-config.php from backup

Use Cases

  • Testing theme or plugin updates
  • Troubleshooting white screens or errors
  • Developing new features without cache interference
  • Checking design changes in real-time
  • Debugging PHP errors and warnings
  • Safe development on live sites

Security & Safety

  • Automatic backup of wp-config.php before modifications
  • All changes only affect administrator users
  • Automatic restoration of original configuration on deactivation
  • Secure nonce verification for all actions
  • No database modifications beyond options
  • Compatible with WordPress multisite

How to Test Plugin Features

After activating the plugin, verify each feature is working correctly:

Debug Mode Testing

  1. Check wp-config.php: Look for the debug constants added by the plugin
  2. Verify backup: Check /wp-content/plugins/anticache/backup/wp-config-backup.php exists
  3. Trigger a PHP error: Add to a theme file
  4. Verify error display: You should see PHP errors on the frontend (admin only)
  5. Check debug log: Look for /wp-content/debug.log file creation
  6. Test error logging: Errors should be logged to the debug.log file
  7. Check WP_CACHE: Verify WP_CACHE is set to false in wp-config.php

Cache Plugin Deactivation Testing

  1. Before activation: Note which cache plugins are active in Plugins page
  2. After activation: Verify cache plugins are deactivated
  3. Check admin notice: Should list which plugins were deactivated
  4. Visit settings page: Go to Tools > Anti-Cache Kit to see deactivated plugins list
  5. Test reactivation: Use the “Reactivate All Cache Plugins” button

Browser Cache Prevention Testing

  1. Make a CSS change: Modify your theme’s style.css
  2. Hard refresh: Ctrl+F5 or Cmd+Shift+R should show changes immediately
  3. Check page source: Look for random version numbers on CSS/JS files
  4. Verify headers: Use browser dev tools to check for no-cache headers
  5. Test as visitor: Log out – visitors should still see cached version

Object Cache Testing

  1. Install Redis/Memcached: If using object caching
  2. Check cache status: Use Redis CLI or monitoring tools
  3. Verify clearing: Cache should be flushed when plugin activates
  4. Manual clear: Test the “Manual Cache Clear” button in settings

Maintenance Mode Testing

  1. Enable maintenance: Go to Tools > Anti-Cache Kit and enable maintenance mode
  2. Test as visitor: Open an incognito/private window and visit your site
  3. Verify maintenance page: Should see the maintenance screen
  4. Test as admin: Logged-in admins should bypass maintenance mode
  5. Quick toggle: Use the admin bar toggle for quick on/off

Hosting Cache Testing

  1. SiteGround users: Check SG Optimizer cache is cleared
  2. Cloudflare users: Verify Cloudflare cache is purged (if plugin installed)
  3. Manual verification: Check your hosting control panel for cache status
  4. Performance testing: Use GTmetrix or similar to verify cache clearing

Overall Functionality Testing

  1. Make theme changes: Modify CSS, PHP, or JavaScript files
  2. Check immediate visibility: Changes should be visible without hard refresh
  3. Test error display: Broken code should show errors immediately
  4. Verify admin-only: Log out to confirm visitors see normal cached site
  5. Check HTML comments: Look for “AyudaWP Anti-Cache Kit” comment in page source

Backup and Restoration Testing

  1. Check backup creation: Verify backup file exists after activation
  2. Note original wp-config.php: Take note of original configuration
  3. Deactivate plugin: Deactivate Anti-Cache Kit
  4. Verify restoration: Check that wp-config.php is restored to original state
  5. Backup cleanup: Verify backup file is removed after successful restoration

Testing Checklist

  • wp-config.php backup is created automatically
  • Cache plugins are deactivated and listed in admin
  • Debug mode is enabled (WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY)
  • WP_CACHE is set to false in wp-config.php
  • CSS/JS changes are immediately visible to admins
  • Random versions are added to asset URLs for admins
  • PHP errors are displayed to admins only
  • Maintenance mode works for non-logged users
  • Admin bar toggle functions correctly
  • Settings page is accessible at Tools > Anti-Cache Kit
  • Manual cache clear button works
  • Plugin reactivation feature works
  • HTML comment appears in page source for admins
  • No-cache headers are sent to admin users only
  • Original wp-config.php is restored on deactivation

If any feature isn’t working, check the debug.log file for error messages or contact support.

Developer Information

Hooks and Filters

  • ayudawp_anticache_maintenance_data – Filter to customize maintenance page data
  • ayudawp_anticache_cache_plugins – Filter to modify the list of supported cache plugins

Constants

  • AYUDAWP_ANTICACHE_VERSION – Plugin version
  • AYUDAWP_ANTICACHE_PLUGIN_DIR – Plugin directory path
  • AYUDAWP_ANTICACHE_PLUGIN_URL – Plugin directory URL

Code Example

Customize maintenance page:

add_filter( 'ayudawp_anticache_maintenance_data', function( $data ) {
    $data['heading'] = 'Custom Maintenance Message';
    $data['message'] = 'We are updating our awesome website!';
    $data['accent_color'] = '#ff6b6b';
    return $data;
});

Support

For support, feature requests, or bug reports, please visit:
* Official website
* WordPress support forum
* YouTube channel
* Documentation and tutorials

Contributing

This plugin is developed following WordPress coding standards and best practices. Contributions are welcome via the WordPress.org plugin repository.

Active installations0+
Weekly downloads
71+82.05%
Version3.0.3
Last updated9/18/2025
WordPress version5.0
Tested up to6.8.2
PHP version7.4
Tags
cachedebugdevelopmentmaintenancetroubleshooting