Cache Cleaner For WP Super Cache
WP Super Cache is an excellent caching plugin, but sometimes it seems to have problems with deleting expired files. For example, even though this site typically gets at least 3000 pageviews per day, and I’ve set WP Super Cache to delete expired files every 1000 requests (the lowest setting), the expired files tend to accumulate. Also, for lower-traffic sites it could take more than a day to get at least 1000 pageviews, and the cache might get stale.
Enter the “WP Super Cache Cleaner” – a simple WordPress plugin that will periodically delete expired super-cache files regardless of whether your blog has reached the “X requests” threshold. You can set it to run either daily or hourly (the default is daily). The plugin will then use the built-in WordPress scheduler to automatically clean the cache that often.
Note that in the current implementation only expired “super-cached” files will be deleted – WP-Cache files won’t be affected.
Download
cache-cleaner.zip (2 KB)
Compatibility : Tested with WordPress 2.6.2 – 2.7 and WP Super Cache 0.8.1 – 0.8.3.
Installation : Upload, activate, go to Settings -> Cache Cleaner to configure.
Extra Tip
For increased reliability, set up a cronjob to run wp-cron.php at the same frequency as you used for this plugin. For example, if your blog is found at “http://example.com/” and your control panel is cPanel, you can set up a cronjob like this :
- Log into cPanel and click on “Cron jobs”. Select the “Standard” interface.
- Select “Every Month”, “Every Week Day” and “Every Day” from the appropriate lists.
- If you set the plugin to run every hour, select “Every Hour” from the “Hour(s)” box. Otherwise, select any other setting from that list.
- Select any number from the “Minute(s)” list.
- Enter this command as “Command to run” :
wget -q -O /dev/null http://example.com/wp-cron.php - Save Crontab.
Note that setting a specific time for the cronjob – e.g. “09:24” – will not make the plugin delete expired files at exactly that time, except perhaps by a lucky coincidence. This is not a bug.
Related posts :
Interesting plugin, but I’ve just tagged a new release of WP Super Cache that does something similar. I’ve had it running on my own blog for the last two weeks and it works fairly well. It deletes expired files at predetermined intervals, the default being an hour.
Hope that works better than the “every X hits” method.
Gah, I guess I need to start coding only things that are completely unique, instead of improvements/hacks for existing systems. They just don’t have staying value.
Edit: The problem is unique ideas are hard to come by or bloody hard to implement.
You’re on the right track though, “Scratch an itch”. Whatever you find useful, others will too.
Anyway, watch my blog, I’ll be posting about the new release shortly 🙂
Hi, I’m having issues with my wp-super-cahche and was thinking to try your solution, dose it work with 0.9.1?
Thanks
No idea, I haven’t tested it with the newer versions because WP Super Cache now includes a similar cache cleaning function.
Simply perfect. the Super-Cache´w cleaning funtction did not worked fine in my web site, but this plug-ing helpped me to work fine. Thank you so much.
[…] revealed some change was recently made to garbage collection timing. Someone suggested I try the WP Super Cache Cleaner WordPress plugin that will periodically delete expired super-cache files regardless of whether your […]
Hi!
This function is not works for me and is not cleaning the cache: “The plugin will force WP Super Cache to delete expired cache files at least this often, regardless of whether the number of requests set in Garbage Collection is reached or not. ”
Is saying: “You do not have sufficient permissions to access this page.”
I have to change some security php level? (some scripts I can install on the server, some not)
Thank you in advance
Andrei
The plugin has been made mostly redundant by the cache cleaning improvements in the newest versions of WP Super Cache. Chances are you don’t really need it.
Thanks for posting this informative post. Never knew that opinions could be this varied. Keep up the good work, Alexander Wright ~ Flyttstdning
[…] ø Cache Cleaner For WP Super Cache | W-Shadow.com ø (etiketler: plugin cache wordpress wp_plugins wp wordpress-glugin) […]
does this increases site’s speed?\
thankss
No, it probably won’t have any appreciable effect on site speed.
[…] ø Cache Cleaner For WP Super Cache | W-Shadow.com ø(etiketler: plugin cache wordpress wp_plugins wp wordpress-glugin) […]