Time To First Byte (TTFB) is a page speed metric, which we discussed many years ago in Time To First Byte (TTFB) Demystified and Reduce Time To First Byte (TTFB). These days many of the managed WordPress platforms are claiming that they can reduce the TTFB to under 200ms all over the earth for WordPress. This kind of claim is completely misleading. With a single server WordPress setup, with presently existing DNS system at least from one country, you’ll get around 1000ms TTFB. For the rest, TTFB will be within 100ms to 600ms. That is because of the geographical distance. Even 1 second is fast. When you are testing TTFB with tools such as:
1 2 3 4 | GTmetrix tools.keycdn.com/performance www.webpagetest.org www.bytecheck.com |
You can test well-known blog sites such as problogger.net
, copyblogger.com
and compare them with your WordPress site. Keep in mind that both of them are using far more costly setups than most of us can afford. For us, a good TTFB is 200ms to 500ms from most parts of the world.
Practical Ways to Reduce TTFB in WordPress
We have applied all of these tweaks and except for using a high-end dedicated server, we do not have many ways to improve the performance of our site.
---
- MySQL Query Cache – There are security concerns around enabling MySQL query cache but this is one of the tricks which make WordPress on steroid. It has been retired since version 8.0. The alternative is using External caching engines (i.e. Memcached or Redis and an HTTP accelerator like Varnish).
- The proper arrangement of DOM elements matters much
- Use W3 Total Cache or WP Super Cache.
- Conflict between WordPress plugins can increase the TTFB.
- If Ad Server matches your web server configuration closely, it will not affect the TTFB.
- CDN is important, but sometimes some content needs to be served from its own server like Icon Fonts.
- Use a good CDN
- Use a good DNS
- Use a good host
- Use a hand-coded WordPress theme and optimize it
- Reduce HTML and CSS errors
- Use the latest PHP
- Optimize Apache2 or Nginx or whatever webserver you are using. Search our website for guides.
- Use Opcache
- Backend optimization is most important for TTFB.
- TTFB is important for Commercial websites, more than the blogs
We use Google/Apache PageSpeed module. Compress your website as much as possible. There are risky SSL-related tweaks such as OSCP stapling.
In short, you have to make sure that your WordPress installation is optimized. The bottleneck is our budget. A dedicated server from MediaTemplate which costs $2000/month will have a slight lower TTFB than the web hosts we have described in our earlier article.
The best possible budget cloud servers we saw were from HP public cloud. But as you know, HP public cloud is now closed. In the same way, the IBM cloud server will perform better. They are real “cloud servers” but people want a budget solution. Apache is always a reliable webserver for PHP. Apache and MySQL are better on a good dedicated server.