One button to clear all caches from WP Rocket, SiteGround, and Divi.
This WordPress plugin adds a single button to your admin toolbar that clears caches from multiple caching systems with one click:
- Clear and Preload cache
- Purge this URL
- Clear used CSS of this URL
- Clear priority elements of this URL
- Clear all minified CSS/JS
- Purge SG cache
- Clear static file CSS generation
- Clear local storage
- Single toolbar button for all cache clearing operations
- Visual feedback with spinning icon during cache clear
- Success/error notifications
- Works on both frontend and admin
- Only visible to administrators
- Gracefully handles when plugins are not active
- Upload the
sd-unified-cache-clear.phpfile to your/wp-content/plugins/directory, or install it as a mu-plugin by placing it in/wp-content/mu-plugins/ - Activate the plugin through the 'Plugins' menu in WordPress (if installed as regular plugin)
- Look for the "Clear All Caches" button in your admin toolbar
- Simply click the "Clear All Caches" button in the admin toolbar (top right)
- The icon will spin while caches are being cleared
- A success message will appear when complete
- If any plugin is not active, it will be skipped automatically
- WordPress 5.0 or higher
- Administrator capabilities
- At least one of the supported caching plugins installed
- WP Rocket - https://wp-rocket.me/
- SiteGround Optimizer - https://wordpress.org/plugins/sg-cachepress/
- Divi Theme - https://www.elegantthemes.com/gallery/divi/
The plugin uses these WP Rocket functions:
rocket_clean_domain()- Clears all cache filesrun_rocket_sitemap_preload()- Preloads cacherocket_clean_files($url)- Purges specific URLrocket_clean_post_cache($post_id)- Clears post cache including used CSSrocket_clean_minify()- Clears minified files- Manual deletion of used-css and critical-css directories
- Removes priority elements post meta
The plugin uses:
SiteGround_Optimizer\Supercacher\Supercacherclasssg_cachepress_purge_cacheaction hook- Direct function calls when available
The plugin uses:
et_core_clear_theme_static_css_folder()- Clears static CSSet_core_clear_cache_folder()- Clears cache folderET_Core_PageResourceclass for clearing page resources- JavaScript to clear localStorage items (et_* and divi* prefixed)
The plugin uses WordPress AJAX to clear caches without page reload:
- Action:
sd_clear_all_caches - Nonce protected
- Returns JSON response with results from each caching system
Currently, this plugin doesn't expose any filters or hooks, but they can be added if needed.
- Initial release
- Support for WP Rocket, SiteGround, and Divi
- Single toolbar button with AJAX functionality
- Visual feedback and notifications
GPL v2 or later
SD - https://github.com/labatt
For issues and feature requests, please use the GitHub repository: https://github.com/labatt/sd-cachebust