Time To First Byte Blues...

Hi all,
I’m a bit of a newbie to website speed optimisation - apart from the obvious compressing images and using a caching plugin etc.
Just done a WebPageTest on my site and this is the result:

I’m running Wordpress with a caching plugin (WP Rocket), but not sure where to go from here.

As you can hopefully see, the TTFB is long at 3.2 seconds and 8.4 seconds in the two first grey bars on the waterfall chart.

Any suggestions greatly appreciated - thanks!

  1. The redirect from asset #1#2 suggests very poorly tuned Webserver config. This should be a few 100 milliseconds at most.

  2. Asset #2 (since you’re running WordPress on this site) suggests either poorly tuned LAMP Stack or code running on your site which is slow or maybe DNS is malfunctioning in your runtime environment.

Install the Query Monitor plugin + enable SAVEQUERIES + WP_DEBUG in your wp-config.php file + check the Debug Bar for info about queries made + HTTP requests made.

If there are many SQL reads, these should be fast + problem likely is your entire LAMP Stack tuning, as reads should come from cached memory + be faster than what’s showing.

If there are many SQL writes, disable plugins or change themes, till there are no writes to render pages, where writes include INSERT + UPDATE + DELETE.

If any HTTP requests are slow, then disable related code, till you either have 0 HTTP requests (best) or all HTTP requests are fast.

If one or many HTTP requests fail, manually input each link in your browser bar. If they fail, then you’ll have to edit + remove these from your code. If visiting these links works in your browser + not on your site, then likely local DNS caching is broken. I’ve hit this several times recently fixing client sites. The cure is generally, to switch to well tooled hosting.

  1. Assets #3-#35 server pretty fast, so after you fix #1 + #2, you’ll have a very speed site.

First thing I did was to test the site, and - especially seeing as I’m looking from about as far away as possible - it doesn’t seem to be that slow. A re-run of WPT shows a very different picture:

This is showing a poorly performing http to https forward, and slow ssl handshaking. At a guess, you’re using a shared server package, and it’s a bit overloaded. I expect you’ve had a few strong words with your provider and/or installed a full page cache ( ah, yes, I see a rocket footer ).

Are you selling worldwide? If so, then I heartily recommend not hosting in the UK - Torquay even more so ( if that’s where their data centre is ). Speed is of the essence with eCommerce sites, so I’d get the static resources delivered by a geo-aware CDN service ( remember, your DNS provider needs to be geo-aware too, so check with them that it is ), and that’ll leave a nice small html framework to be delivered directly. Given the size of the pages, this won’t be a large cost ).

Just one comment… the product price. It tells me it’s in $, but I don’t know whether it’s NZ$ ( because it tells me it knows where I am in the checkout ), US$ ( it’s a .com ), and it also converts it to UKP on the last line of the checkout data. It would be less confusing if a little banner let me know which currency was in use.

Thank you so much for taking the time to have a look - I really appreciate your advice. I’ll see if we can find a geo-aware CDN service.

Thanks also for the comment on which currency is being used - good point!

First thing I did was to test the site, and - especially seeing as I’m looking from about as far away as possible - it doesn’t seem to be that slow. A re-run of WPT shows a very different picture:

This is showing a poorly performing http to https forward, and slow ssl handshaking. At a guess, you’re using a shared server package, and it’s a bit overloaded. I expect you’ve had a few strong words with your provider and/or installed a full page cache ( ah, yes, I see a rocket footer ).

Are you selling worldwide? If so, then I heartily recommend not hosting in the UK - Torquay even more so ( if that’s where their data centre is ). Speed is of the essence with eCommerce sites, so I’d get the static resources delivered by a geo-aware CDN service ( remember, your DNS provider needs to be geo-aware too, so check with them that it is ), and that’ll leave a nice small html framework to be delivered directly. Given the size of the pages, this won’t be a large cost ).

Just one comment… the product price. It tells me it’s in $, but I don’t know whether it’s NZ$ ( because it tells me it knows where I am in the checkout ), US$ ( it’s a .com ), and it also converts it to UKP on the last line of the checkout data. It would be less confusing if a little banner let me know which currency was in use.