How to fix wp-super-cache 0 Cached Pages

→ Are you a new visitor? Please visit the page guidance for new visitors ←

How to fix wp-super-cache 0 cached pages issue

Today I stumble upon an issue which I was seeing for some time now, I had no idea why on each browser request it will always need to wait for almost a second on a normal “cached” (at the time thought it was cached) static page. Later I found out that it was actually an issue with wp-super-cache which didn’t actually generated any cached pages.

I tried removing everything manually (as automatically had no effect) exactly how it explains on the uninstall guide:

  1. Turn off caching on the plugin settings page and clear the cache.
  2. Deactivate the plugin on the plugins page.
  3. Remove the WP_CACHE define from wp-config.php. It looks like define( 'WP_CACHE', true );
  4. Remove the Super Cache mod_rewrite rules from your .htaccess file.
  5. Remove the files wp-content/advanced-cache.php and wp-content/wp-cache-config.php
  6. Remove the directory wp-content/cache/
  7. Remove the directory wp-super-cache from your plugins directory.

Afterwards tried to install the plugin back to be able to use it, however the response back was really the same, 0 cached pages.

I then started looking at another installation I had on the same cpanel account which was working great, luckily I did fixed this in the past, but I tend to forget things a lot so since I didn’t write it or note it, I had to find the solution again.

Also, it didn’t really linked only to wp-super-cache, w3-total-cache also had  “approximately” the same issue, only this plugin has a more “forced” browser cache options which didn’t helped me seeing the actual issue.

By luck I thought of checking the wp-settings.php file, I’m not sure exactly why, but I did remembered the last fixed was related to this file. So did compared this file to a working site and I found out that it was missing the line:

The above line needs to be added right *after* the line:

Save the file, go back to wp-super-cache and click the Contents tab, by now it should be working, and cache files should be generated. I also noticed a nice feature which is really great for websites that has fewer  posts. This is called Preload.

What it actually does it generates a cached page for each of your posts, categories, tags etc.  This can come in handy for small websites which won’t be having lots of hits to generate the cached pages on the fly.

From the Preload section description (which I agree):

This will probably help your Google ranking as they are using speed as a metric when judging websites now.

It should be noted though, most shared hosting provided have inode limits, with over 10,000 posts, you will use at least 10,000 inodes. May not be a good idea to just use them like this.

Request an article ←