What is TTFB? and why you should care about it?

TTFB stands for Time To First Byte. In simple terms, it means the time it takes for a server to return any data. That is, the total time for a server to process a request. In the context of WordPress, it is the time it takes for anything to start appearing on the page once you enter a site’s url.

The data can be an HTML page, and image, json or any other form of data.

The importance of TTFB

TTFB is a very important parameter in measuring a site’s performance. It is a good indicator of a site and hosting platform’s health. Lower the TTFB value, better is the hosting. A high TTFB points to issues in the fundamental parts of a site: hosting or theme. It is better to start with a decent TTFB and optimize the site, instead of trying to optimize a site with high TTFB, because such optimizations will be cosmetic and temporary.

For instance, here is the GTMetrix report for an Astra starter site hosted on Cloudways:

dTTFB for Astra on Cloudways

As you can see, the TTFB in this example is 334ms.

What is a good TTFB value?

Although there is no fixed good TTFB, we can observe and make some assumptions.

Generally, TTFB should be less than 1s for a good site and less than 0.5s for an optimized site.

For example, here is the GTMetrix report for WPBeginner: GTMetrix report of WPBeginner

WPBeginner’s TTFB tends to be in the range of 100-300ms which is awesome.

What are the things that affect TTFB value?

As mentioned before, TTFB is an indicator of the fundamental performance of a site. Two things that affect it the most are : 1>Hosting. 2>Application server.

In the context of WordPress, CMS is the application server. Hosting is the combination of the hardware (processors,hard disks etc) and software (operating system, webserver etc) infrastructure. Most reputed hosting companies have moved towards NGINX (pronounced engine X) webserver and SSD hard disks.

So, a good hosting should provide NGINX webserver, SSD hard disks, suitable RAM and processing power.

Although WordPress is a good Application Server, it’s speed is affected by themes and plugins a site uses. A bad theme can degrade the performance of the site even if it is hosted on a good hosting platform. So, choosing a good theme is very important to ensure a good TTFB value.

How can TTFB value be improved?

As mentioned above, choosing a good hosting, and a good theme are the most important steps to ensure good performance, and in turn, a good TTFB value.

Another way to improve TTFB is to use a premium DNS service. Premium DNS will result in a faster performance and improved security.

How to determine the cause of bad TTFB value?

To determine the cause of a bad TTFB value, we can follow these steps:

1> Determine if hosting is the cause: to determine if hosting is the cause of bad TTFB, please install WordPress on a subdomain. Now run a GTMetrix analysis. If the TTFB score is better now, then the hosting is good. The bad TTFB value may be caused by a poor theme and plugins.

2> Deactivate all plugins. Clear all cache. Now run a GTMetrix analysis. If the TTFB is not improved, then the theme is the cause of the high TTFB value. If the TTFB is improved, then both the theme and hosting are good, and, one or more plugins may be causing high TTFB value.

3> If the TTFB improved in step 2, activate plugins one by one and see if performance is affected.

Following the above steps it should be possible to ensure a good TTFB value for your site.

Leave a Reply