Better performance from WP Super Cache
If you use the WP Super Cache WordPress plugin (and you should, if you use WordPress), it has a settings page section titled “Expiry Time & Garbage Collection”. It sets the “Cache Timeout” to 3600 seconds by default, and warns that you should set it lower on a busy site.
That advice makes sense if you have a sudden surge of traffic to a single page. However, if your site is generally very busy across all pages (for example, if you have an archive of hundreds or thousands of posts that are constantly being indexed by search engines), we’ve found that you should do the opposite to improve performance: set it much higher. We recommend setting it to 172800 seconds (which is 48 hours). This can cut your CPU usage in half, which will speed up your site.
The reason for this is that when WP Super Cache creates a cached page, it wants to make sure that those pages don’t build up forever. Every ten minutes or so, it looks through them all and deletes any that are older than the “cache timeout”.
On some servers that use a network file system called “NFS”, looking through a large number of files causes performance problems. That’s why the WP Super Cache author recommends making them expire quickly: it reduces the number of files it has to examine each time.
On our servers, we don’t use NFS and looking through lots of files does not cause a performance problem. Leaving the files for a longer time is safe and increases the chance that a page will already be cached when it’s needed.
If you’re a Tiger Technologies customer who makes this change and you want to see how it affects the CPU usage, just let us know and we can provide you with details.
Updated 2013-06-11 to reflect that the plugin field is now named “Cache Timeout” instead of “Expiry Time”.
on Sunday, February 7, 2010 at 4:22 am (Pacific) yos wrote:
How about W3 Total Cache? There’s more features (CDN integration, etc) and it’s able to cache on memory, good for private server but also able to cache on disk (which blogs on shared web hosting usually do).
Currently I use it for my personal blog (which already perform very good with Tigertech hosting), but even more with that plugin.
on Sunday, February 7, 2010 at 8:12 am (Pacific) Robert Mathews wrote:
How about W3 Total Cache?
We can’t recommend W3 Total Cache, unfortunately. We’ve seen customers switch to it and completely kill the performance of their site.
We don’t know why it caused problems in those cases, but we’re sticking with WP Super Cache ourselves….
on Friday, February 26, 2010 at 3:53 pm (Pacific) todd wrote:
W3 total cache settings are simple (once you understand them), if you have a standalone server use disk enhanced method for page cache — if you have a slow disk or underpowered server disk caching for database or HTML minification is not a good idea. however, if your server is underpowered you’ll definitely want to use the CDN functionality with a good provider like http://maxcdn.com. unfortunately, there are so many options available that some users of the plugin may not know what’s best for their case. the plugin seems to be making those more clear with the next release (i was someone who had trouble understanding all of the options, and once I did everything clicked).
on Sunday, March 28, 2010 at 12:25 pm (Pacific) Virendar wrote:
I use scopehosts.com . How can i check if they use NFS ?
on Monday, March 29, 2010 at 2:29 pm (Pacific) Ken wrote:
You should contact scopehosts.com and ask them. NFS is a basic part of their network infrastructure (if they are actually using it), and only they would know if they are using it internally.
on Saturday, October 2, 2010 at 1:11 am (Pacific) pointdesi wrote:
My wordpress blog hosted on lunarpages every week they banned my account due to high cpu usage. How could i use wp-super-cache to work properly and how to set expire time?
on Saturday, October 2, 2010 at 4:49 pm (Pacific) Robert Mathews wrote:
Without seeing the site ourselves, it’s hard to say what’s wrong at another hosting company. But WP Super Cache, with the tips here and on our WordPress performance page, should dramatically reduce CPU usage, so make sure you try everything mentioned.
on Wednesday, October 6, 2010 at 10:49 am (Pacific) torsak wrote:
thank for advice.
on Saturday, November 6, 2010 at 9:34 am (Pacific) Jim McDonnell wrote:
I tested w3 total cache for 10 days on my server, then rolled back to wp-cache. W3 Total Cache is not ready for production in my view. It tested slower than wp-cache, and the support/documentation required for such a complicated plugin is not available. My site is a new blog, very small with almost no traffic. Results here:
In the future, W3 Total Cache might the way to go, but its time has not come yet. Give it 6 months to a year would be my advice.
on Tuesday, November 16, 2010 at 2:39 pm (Pacific) dbunic | www.redips.net wrote:
My site is pretty static. I mean new content is added every day or two. Will it be reasonable to set expire time to say 1 day – 86400 sec? This should decrease server load but I heard about blank page problems in the past … Thanks!
on Saturday, November 20, 2010 at 9:32 pm (Pacific) Robert Mathews wrote:
dbunic: We’ve never seen blank pages as a result of increasing the cache on our servers. We can’t rule it out on other company’s servers due to some kind of problem on their end, but it certainly should be safe in theory.
on Tuesday, March 1, 2011 at 12:45 pm (Pacific) delphix wrote:
Thanks a lot for your advice, I’ll try. I’ve a question for you: Can google index my pages if i use “Disallow: /wp-content/cache” command in my robots.txt?
on Tuesday, March 1, 2011 at 12:56 pm (Pacific) Robert Mathews wrote:
>Can google index my pages if i use “Disallow: /wp-content/cache” command in my robots.txt?
Yes. The robots.txt file entries represent URLs, not file paths; the fact that WordPress grabs something like “http://example.com/postname” from your cache directory is irrelevant.
(On the other hand, there should be no need to disallow access to your cache directory, because search engines wouldn’t usually be accessing your site via URLs like “http://example.com/wp-content/cache/something” in the first place.)
on Tuesday, March 8, 2011 at 4:08 pm (Pacific) delphix wrote:
Thanks for answering, Robert.
on Friday, February 15, 2013 at 2:00 am (Pacific) India wrote:
In latest edition of W3 Total Cache, its Garbage collection interval in Page Cache tab.
What is Header expiration time ? This is in Browsers Cache setting.
on Wednesday, May 15, 2013 at 12:34 pm (Pacific) Infinity Tech World wrote:
I was not know how to install this plugin.Then when i install this plugin then i have lost my blog, for this reason i have also lost all of my data and information.Now i am safe.Give me some suggest how to be fast my site.Hear is my site http://inftechworld.com
on Thursday, May 16, 2013 at 9:45 am (Pacific) Robert Mathews wrote:
Infinity Tech World wrote:
>Then when i install this plugin then i have lost my blog, for this reason i have also
>lost all of my data and information
Sorry to hear that! Since our company doesn’t host your site, we don’t have any way of knowing what went wrong, unfortunately. You should post on the WordPress support forums for general questions and trouble with the plugin.
on Monday, December 9, 2013 at 2:46 am (Pacific) vijay wrote:
We have a quite big classified site that gets updated per 30 mins. What should be the ideal setings for this to use optimal server load. Thanks. I hope you offer me a good advice on that ( we use Hostgator and they specifically recommand WP super Cache).
PS– you should give us an option to subscribe your comments.
on Monday, December 9, 2013 at 9:19 am (Pacific) Robert Mathews wrote:
>We have a quite big classified site that gets updated per 30 mins. What should be the ideal setings
>for this to use optimal server load
We have a Web page showing the settings we recommend: Using the “WP Super Cache” WordPress plugin.
>PS- you should give us an option to subscribe your comments.
You could subscribe to just comments using this RSS comment feed to the whole blog, or this RSS comment feed for just this page. (You can just stick “/feed/” on the end of many WordPress URLs and get a working RSS link.)
But most people (particularly our customers, who this blog is mostly for) will want to subscribe to the whole blog using the link in the right column.
on Saturday, January 4, 2014 at 2:25 am (Pacific) Graeme Smith wrote:
Thanks for this info, will try out the settings.
I maintain 50+ wordpress sites and advise many on the best plugins, based on my own experience and I can confirm W3 Total Cache kills the sites. I have done lots of testing with different user recommended setups using many to no plugins and different hosts and I still find Super Cache far superior.
on Friday, October 10, 2014 at 12:32 pm (Pacific) marek wrote:
Thanks for the tips. What settings would you recommend on the ‘preload’ section of WP Super Cache?
Also I have a small problem, maybe you could help, when I first fetch a page in google wm tools it is showing ‘Temporarily unreachable’ but when I fetch it a minute later it shows as ‘complete’ Do you think that the ‘Temporarily unreachable’ error is related to cashing plugin ? Thanks.
on Friday, October 10, 2014 at 1:37 pm (Pacific) Robert Mathews wrote:
>What settings would you recommend on the ‘preload’ section of WP Super Cache?
That section isn’t used for normal speedup of all pages, and doesn’t matter for the purposes being discussed here. You can just ignore it.
>Also I have a small problem, maybe you could help, when I first fetch a page in google wm tools it is
>showing ‘Temporarily unreachable’ but when I fetch it a minute later it shows as ‘complete’ Do you
>think that the ‘Temporarily unreachable’ error is related to cashing plugin ?
We haven’t heard of this before. If you’re one of our customers, please open a ticket with us using the “Contact” link above and we’ll try to help.
on Friday, October 10, 2014 at 3:34 pm (Pacific) marek wrote:
Thanks a lot for your reply. I have disabled ‘preload’ and it appears that my pages are loading faster and the ‘Temporarily unreachable’ error is gone.