HOWTO: Fixing the wp-cache “0 files” bug
I moved my websites to a virtual private server at Dreamhost last week and found that the wp-cache plugin stopped caching files. It’s a simple problem and a simple fix, but it took me a few minutes to realize what was happening.
The symptoms
- Site pages take longer than half a second to load
- The
wp-cachestamp can’t be found on some or all of your site pages (found after the footer when viewing the page source) - After deleting the cache using
wp-cachecache manager, no new pages are added to the cache
The fix
The bug is caused by restoring an old version of your site files, or by moving your site to another server (or otherwise changing your server setup). The symlink wp-content/advanced-cache.php gets out of sync with your WordPress installation, and now refers to an invalid location.
sshto your server, andcdinto thewp-contentfolder- Delete the symlink (
rm advanced-cache.php) - Go to the
wp-cachemanager page in your WordPress admin panel - Disable/enable the cache, and load some pages on your site
wp-cachewill now relink the configuration and caching will resume- Test by looking for the
wp-cachecomments in the footer of your returned page source
