Slow Time to First Byte: WP Super Cache & W3TC

I’ve been reading a lot of the posts here and it seems that a lot of people are having issues with First time bytes, even though they’re using caching plug-ins like the W3TC. I’m not an expert in this matter, but with my site I haven’t had any luck getting an A or B score with W3TC, no matter how right I’ve configured the W3TC to be. I just don’t know why but W3TC didn’t want to cache the database on my site. I even used APC cache on W3TC and that didn’t seem to help (I’m on a dedicated server).

Surprisingly when I tried WP Super Cache everything was resolved automatically and TTFB is consistently always on A, with the occassional drops but very rare.

I tried to ask Frederick Townes about this but I understand that he’s very busy and doesn’t have time to respond to every one inquiry. The thing is I still want to use W3TC as it has better features built-in compared to WP Super Cache. But every time I go back to W3TC then TTFB would jump back up again, so I’m definitely on WP Super Cache now.

This is just a post from one webmaster to another. You can try WP Super Cache and see if it works for you. If not you can always go back to using W3TC. On my site I had all the optimization but was always stuck with TTFB times, turns out that Super Cache is the solution.

Disclaimer: no relation with W3TC or WP Super Cache whatsoever, just trying to throw an idea for those of you having problems.

PS: Here is a recent test that I did:

May I know what features you are missing in WP Super Cache from W3 Total Cache? I worked with both, and now dropped both because I got some of the required functionality using other plugins or using server side implementations. I missed pre-loading, though. But, I’m not too concerned about it.

I’m glad to hear it works well. But, I hope you test the site from different locations, different browsers and at different time of the day. It is very rare to get A on TTFB at most of the times. For example, here is the latest result of your site from a different location…

W3 Total Cache gives you some tools to do front-end optimizations (moving javascript, extending cache headers, etc) that I don’t believe WP Super Cache provides. You can do it all by hand as well, it just makes it easier.

I hear you… I am so frustrated… this whole thing has consumed me… for at least 3 weeks now I have been trying to get better results. I think I lost my first page ranking on Google because my TTFB was so bad. I have W3 activated now… and I am getting a 76 score on Google’s Page Speed and many times a F on TTFB here. I am even using Amazon’s Cloud Front… shouldn’t I be getting better results? Sometimes I can get an A for TTFB.

I also still keep getting messages to Leverage Browser Caching but I have it enabled … however, it does not seem to handle everything. I noticed someone else said they are using other things besides WP Super Cache or W3 Total Cache… what are you using?

Is there a tutorial for trying to handle this manually… maybe we might get better results? I just do not know anymore… I have been so discouraged.

I am wondering if it truly is my host StartLogic… because sometimes I even get an External Server Error…it is rare… but it happens. I am wondering if DreamHost is better?

I just really want to get this resolved so I can go back to tweaking my site and getting more things up!

Any ideas? Anyone?

Amazon’s cloudfront will be used for your static resources (images, etc), not your base HTML so it won’t do anything to help your first byte times.

For TTFB, Manually you would:

  • Instrument the app (or use the timings from a plugin like W3TC debug) to figure out where your time is going (probably database)
  • Remove any plugins that aren’t critical
  • Optimize any database queries that are slow (or yell at your hosting provider about database performance and watch them ignore you)
  • Use caching to improve any remaining performance issues

At the end of the day, you are basically trying to hide the crappy performance of the underlying hosting provider and you will get highly variable times from just about all low-cost shared hosting providers. Moving to a VPS where you have a lot more control will give you a lot more options but at a cost.

For the rest of the page:

  • Make sure images get unique file names
  • Edit the template to move javascript and give all javascript and css unique file names
  • Add expires headers to your .htaccess for images, javascript and css

Actually, the “D” he got in that test was only because of a very long DNS lookup time of 336 milliseconds. His Time To First Byte was still a very decent 174 ms.

For me the only two plug-ins that I ended up using is WP Super Cache and WP-Minify.

The minute I installed WP Super Cache TTFB has been consistently As. Things like CDN, Minify, and expire headers/browser caching should not affect TTFB. (Patrick please correct me if I’m wrong here).

So if your problem is TTFB, you should check if WP Super Cache or W3TC is doing a good job in caching the database.

BTW this is the post I made about the TTFB problems I had:

Correct, none of the other checks have anything to do with TTFB and they can all be tackled independently. In “theroy” W3TC is supposed to help with most of them but I have seen a lot of cases where it just doesn’t seem to kick in for some reason.

Thank you guys for responding. I will just play with both plugins I guess to see which would be best… :slight_smile:

I expect using cloudflare to result in an increased time to first byte, as it reads the html first, and (depending on the options set) reorders and minifies and combines javascript (and css?) files, and maybe minifies the html before passing on the html to the browser. The performance benefits from cloudflare come from

  • sending minified resources over the last slow step in the journey to the users browser
  • optimising the order resources are delivered
  • delivering static resources from cloudflare’s cache servers ‘nearer’ to the user.

On balance, I reckon that cloudflare does improve the user experience - and it blocks a good proportion of unwanted visitors.

I know this topic was open a long time ago. :s
But, I have the w3 total cache ttfb problem too.
It was between 1 to 5 seconds since I install w3 Total Cache. :huh:

I solve my problem by deactivating gzip (deflate) option in browser caching section.
and my ttfb was now 0.2 or 0.3 !! :smiley: