WP Super-Cache Not Deleting Expired Pages

I recently tweaked our blog template and was surprised to see a large number of pages were still displaying the old template! Obviously these pages were being displayed by WP Super-cache, but I had already deleted the wordpress cache, so how was it possible?

I was using the latest version of WP-super-cache 0.8.4 (like most wordpress users), a superb must-have plugin that provides a very fast caching module for WordPress, which means your site can easily survive a Digg on a shared server. When I checked the Supercache admin panel, it showed the counter stuck at 1183 expired files in supercache, and it would not change whatever you do.

WP-Supercache Not Deleting Expired Pages

After repeated attempts I simply could not delete the Super cache expired files – I tried turning the plugin on and off, tried to turn it half on (WP-cache only, Supercache disabled), supercache compression on and off, delete cache button, delete expired button… but nothing helped.

The first time I had installed WP-supercache a few months back, it was not caching pages, but I fixed the issue. This time however the problem refused to get fixed. I simply could not let 1183 frequently visited pages on the site show outdated pages with an older template.

Switch to Older Version of WP-Supercache

I realized the problem had occurred since I installed the latest version of WP-supercache recently by plugin autoupgrade. The changelog 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 blog has reached the X requests threshold. However, only expired super-cached files will be deleted and WP-Cache files wont be affected.

Since it would take time before more users reported the issue, a bug was identified, and a new version released, I decided to switch back to the previous version. But where could I find the previous version of WP-supercache?

Fortunately wordpress plugin headquarters archive all older plugin versions. I found the older version of WP-Super-cache (0.8.3) there and downloaded it. Then after backing up my current WP-supercache folder from the server, I uploaded the older version. Then I reactivated the plugin, pressed delete cache and… Expired pages = 0

More Supercache Experiments

UPDATE: WP-super-cache stopped working again after switching back to an older version. Till then manually deleting the cache seemed to be the reasonable option to keep the site going. I then switched back to the latest version. And here is how I proceeded further.

Under wp-content/cache/supercache/ there were hundreds of folders. I deleted all of them, but some folders refused to get deleted and had strange triple backslashes.

directory not empty

Undeleted folders

I figured maybe these folders were causing the cache to get stuck. Since these folders were undeletable via my FTP client Filezilla, I had to login via Shell using puTTY and delete these folders. Once the Supercache folder was empty, I tried to deactivate and reactivate. Still not working.

Now based on my previous experiences I deleted advanced-cache.php link in wp-content. Then I temporarily gave 777 priveleges to wp-content, again deactivated and reactivated the plugin, a new advanced-cache.php was created automatically, switched back wp-content to 755 and behold – the caching started as normal.

This is my personal experience, I am no professional expert in this, try it at your own risk.


  1. Tinh says:

    I did install it once but delete after a while as it make my tweaks slower. I have no idea about this

  2. Arun Basil Lal says:

    Hey, I am using WP-Cache From and that works without any problems. You should try it out i suppose

  3. Donncha O Caoimh says:

    Check your access logs for that url – is there an entry with odd characters at the end? AFAIR, the plugin should remove those characters, but I’ll check that code again. Thanks for digging deeper into the problem!

  4. Baz L says:

    I did have recent issue with WP-SuperCache but that was because I had recently switched hosting. The symlink file: advanced-cache.php had my old path in it and that was causing issues (similar to yours).

    Did you change your directory structure recently? Stick the blog in a different folder? Switched hosting or accounts?

  5. whatisabc says:

    Thanks for sharing..

  6. Kurtlar Vadisi says:

    hmm thanx :)

  7. QuickOnlineTips says:

    @Baz – Did you change your directory structure recently? Stick the blog in a different folder? Switched hosting or accounts? – None of that.

    @Donncha – its great to see the plugin author drop by and take feedback so seriously. You have created an incedible plugin and we cant thank you enough.

  8. Donncha O Caoimh says:

    QOT – hopefully we can get to the bottom of this problem. Did you notice anything in your logs?

  9. Michael Aulia says:

    Works fine here on my blog. Maybe double check again the htaccess file and ask SuperCache to regenerate it?

  10. DemoGeek says:

    I had some caching issues with WP-Cache and reinstalling solved the issue.

Leave a Reply

Your email address will not be published. Required fields are marked *