How to Improve WordPress With Better TTFB

by | Last Updated Jan 19, 2021 | WordPress | 0 comments

Today we will discuss how TTFB (Time to First Byte) impacts you and how to reduce it. TTFB is commonly an overlooked performance metric, but it should be considered when testing your site’s speed.

We often focus on front-end performance and optimizations when it comes to your WordPress site’s overall speed. However, sometimes it’s best to examine it from the server-side, where your website generates.

What is TTFB?

TTFB means Time to First Byte.

In simpler terms, this is the time taken before the browser receives its first byte of data from the webserver. The longer it takes to receive this data, the longer it takes to display your web page.

A common mistake is to calculate TTFB after DNS lookup times. However, network latency is always included in the original calculation of network TTFB.

This is a three steps process. Delays and latency can occur wherever they are, contributing to your total Time to First Byte.

1 – Request to the Server

The first thing that happens when someone visits your website is that an HTTP request is sent from the client to the server. A visitor’s web browser is usually referred to as the client.

Many factors can lead to delays during this step. Slower DNS lookup times could cause increased request time.

The server may be geographically far away, so distance may introduce latency due to the range the data must travel.

Also, if the firewall has complicated rules, the routing time could increase. Don’t forget to take the client’s internet speed into account.

2 – Server Processing the Request

Following the submission of the request, the server has to process it and generate a response. This may introduce many delays, including slow database queries, too many 3rd party scripts, poorly optimized code. If the WordPress theme isn’t responsive or the plugin is poorly coded, it will delay the response.

Weak server resources, such as disk I/O or memory, will delay the process even further.

3 – The Response Back to the Client

The server must then send the response back to the client after processing the request. Or perhaps I should say the server must return the first byte.

Both the client and the server have a significant influence on this. In case the client’s internet is slow from a Wi-Fi hotspot, it will be reflected in the TTFB.

How Critical Is TTFB?

It is vital to understand that Time to First Byte and website speed are not the same.

TTFB measures responsiveness.

There is a lot of discussion on the internet about whether or not TTFB matters. Some consider it irrelevant, and others think it is significant.

Both sides bring up valid arguments as to why it is essential or not influential and questions about how it is calculated.

Hang on! We would instead focus on optimizations, which you can do for this metric to improve, rather than discussing if it matters or not.

Each action you take will affect your overall site speed, which directly affects the TTFB.

In our tests, sites with much higher TTFB feel slower and load more slowly.

Time to First Byte is best when it is under 100 milliseconds. Under 200 ms is the recommended server response time, based on Google PageSpeed Insights. If your response time is between 300 and 500 ms, it is normal.

If you see an average TTFB of over 600 ms, you might have a configuration issue on your server. In that case, you might need to upgrade your web stack.

Or follow our tips below for reducing your TTFB.

How to Check Your TTFB

It is possible to test your TTFB in a variety of different ways. We will discuss a couple below.

But keep in mind that each tool will give slightly different results, so you should choose one and stick with it for a baseline.

Measure TTFB Using Google Chrome DevTools

You can launch DevTools in Google Chrome to measure Time to First Byte.

TTFB is affected by network latency and your internet connection. Be aware of this if you are testing from your computer. In short, your computer and your internet speed will affect the Time to First Byte results.

This is why a third-party tool run from a data center is probably more useful.

You can launch the DevTools in three ways.

  • From the Google Chrome menu, select More Tools > Developer Tools.
  • Right-click and select Inspect on any page element.
  • Use the keyboard shortcut Ctrl + Shift + I.
TTFB Test Google Chrome DevTools

You can view the site’s performance by launching the Network tab.

This test shows that Rovity’s website TTFB is 36.33 ms, which is pretty incredible.

Measure TTFB Using WebPageTest

You can test your TTFB with the WebPageTest site.

Visit WebPageTest and input your domain name. Rovity is hosted in Mumbai. Most of our customers are within the Asia region. So I will select Mumbai, India, as the Test Location.

Now click on the Start Test button and wait for the result generated.

Web Page Test Org TTFB Test

As you can see, the result is 0.181 seconds; that means 181 ms TTFB.

That’s pretty impressive.

Measure TTFB Using Pingdom

WebPageTest and Google Chrome refer to it as TTFB. However, when you use Pingdom, it is called Wait time.

Visit the Pingdom Website Speed Test page and input your URL. For this test, I have used Asia – Japan – Tokyo.

Now click on the Start Test button and wait for the result generated.

Pingdom TTFB Test

From the Pingdom test, we got 152 ms as our TTFB.

Measure TTFB Using GTmetrix

Visit GTmetrix and enter your URL to analyze.

Please note that, with a GTmetrix account, you will get much more control like the test locations.

So, I have logged in and selected the Test URL in Mumbai, India.

Then click on the Analyze button and wait for the result generated.

GTmetrix TTFB Test

From the GTmetrix test, we got 26 ms as our TTFB.

Fantastic.

Measure TTFB Using KeyCDN Performance Test Tool

KeyCDN has an excellent web performance testing tool that lets you test your TTFB simultaneously from 10 different locations.

KeyCDN TTFB Test

The TTFB is lower in Bangalore than in other locations, as you can see in our test screenshot.

This is because our servers are physically located in Mumbai, India. This result is direct evidence of the importance of latency and distance to the TTFB score.

Fast or Slow is another handy tool to measure TTFB and many other metrics. Fast or Slow offers 17+ test locations around the globe.

How to Reduce TTFB on Your WordPress Site (4 Methods)

Now let’s talk about how you can reduce the Time to First Byte of your WordPress site.

1 – Host Your WordPress Site on a Fast Web Host

The first step to reducing Time to First Byte is to make sure you’re using a fast WordPress host.

Premium shared hosting services like Rovity can help your WordPress website have a lower TTFB, just like our website has. Rovity is hosted on AWS’s robust cloud infrastructure with cutting edge software like LiteSpeed Web Server and CloudLinux OS.

If you want to lower your TTFB, a good WordPress host is essential. Our tests illustrate how important it is to choose a server near the region that your customers reside.

You don’t want your server in the US if most of your customers are from India. However, a CDN can help neutralize some distance.

2 – Implementing a CDN

Utilizing a CDN is another way to decrease TTFB.

Imagine that you have a website that serves visitors from different parts of the country or the world. In such a case, your TTFB may be drastically reduced with a CDN.

Note: If you use Cloudflare, your TTFB may be a bit higher. This is because the fully proxy service has an added overhead and complexity.

Cloudflare provides additional firewalls and other features that other CDNs might not offer. Therefore, you will have to decide what is more beneficial for you. If you aren’t optimizing your entire site, then a slightly higher TTFBT could be worth it.

Robust Global CDN with 49 PoPs

Tier 1 Network Partners. < 30ms Global Latency.

Get access to our vibrant CDN for FREE and have a blazing fast website next to your customers; wherever they live.
In India, we have PoPs in Bangalore, Mumbai, and New Delhi.

3 – Utilize WordPress Caching

The third and probably more effortless way to decrease your TTFB is to leverage caching on your WordPress site. Many people only think that caching reduces load times, not realizing that caching also lowers TTFB. It reduces server processing time.

At Rovity, we provide free LiteSpeed Cache that integrates seamlessly with our web server. Our server-level caching will indeed reduce the TTFB significantly.

4 – Use a Premium DNS Service

Furthermore, DNS plays a vital role in TTFB. It’s hard to pinpoint precisely how much it’s affected. However, you can still see how fast and slow DNS providers are.

DNS Performance Analytics

Check DNS Performance Analytics here to make an informed decision.

Summary

You could optimize or fix many other things to reduce Time to First Byte. Some of them are PHP settings, TLS overhead, RAM, database caching, MySQL settings, network settings, Disk IO.

But above are the ones that are relatively easy to implement and give you the most significant performance boost.

So whenever someone asks you how to lower your TTFB, remember that WordPress hosts have a lot to do with it. CDN, caching, and DNS are a few host-related issues a host can manage.

The trick is to fix or improve those bottlenecks.

How was your experience with TTFB? We would love to know about it in the comments.

If you enjoyed this tutorial, then you’ll love Rovity and our fast-growing premium shared hosting on the cloud. Check our subscription plans.

We engineered our cloud infrastructure with Performance, Speed, Scalability, and Security in mind.

That’s why we built Rovity with AWS, CloudLinux OS, DirectAdmin, and LiteSpeed Web Server.

Come and experience the next generation of shared hosting on the cloud

By Jafar Muhammed

Jafar Muhammed has 10+ years of experience in WordPress, web hosting, domain names, DNS, CDN, server administration, etc. He is an open web advocate. He is the CEO of Rovity, the fastest growing premium shared hosting startup in India.

Check Out These Related Posts

Avoid These 8 Blogging Mistakes in 2021

Avoid These 8 Blogging Mistakes in 2021

Blogging plays a large part in the $400 billion content marketing industry. Blogs are an excellent way to make substantial extra income. They're also powerful tools for generating traffic to your website. Blogging isn't just a part-time gig and a digital marketing...

read more
How to Add HTTP Security Headers in WordPress

How to Add HTTP Security Headers in WordPress

Would you like to add HTTP security headers to your WordPress website? With HTTP security headers, your WordPress website will have an extra layer of protection. This will prevent malicious activity from affecting your website performance. The tutorial below will walk...

read more

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *