How To Reduce Server Response Times (TTFB) In WordPress To <100ms Globally: Your Hosting + CDN Are The 2 Main Factors

The correct way to measure TTFB (server response time) is in KeyCDN or SpeedVitals. Unlike PageSpeed Insights and GTmetrix, they test from multiple locations. Test your site 3 times in either one to ensure your site’s resources are cached and served from the closest CDN location.

Keycdn global ttfb

TTFB is also 40% of LCP and is the most important metric for improving core web vitals, affecting 4/6 user metrics. According to Google, your host/CDN are the 2 main TTFB factors.

What Is A Good TTFB?

Google flags your TTFB if it’s over 600ms but they used to recommend just 200ms. You can aim for 600ms on shared hosting and 200ms on VPS/cloud. TTFB also depends on where you test it.

0-200ms Google Recommended
0-600ms Passes Core Web Vitals
600ms+ Fails Core Web Vitals

 

1. Choose A Data Center Close To Your Visitors

Choosing a host with a close data center to visitors is an easy way to improve TTFB.

Siteground data center

In KeyCDN’s Performance Test, TTFB gets slower as the data center gets further away. This is a better way to test TTFB than most tools (like GTmetrix) which only test it in 1 location at a time.

Keycdn performance test cloudflare 1

However, don’t choose a host only based on their data centers. You need to look at their hardware, software, CDN, cache plugin, and several other factors besides a “close data center.”

When using more powerful CDNs like Cloudflare Enterprise, using a close data center barely matters since your TTFB is often able to average 100ms globally. This is due to caching both static/dynamic files (using full page caching) while using other CDN features like smart routing.

 

2. Move Your DNS To Cloudflare Or QUIC

Use Cloudflare’s DNS in most cases (or QUIC’s DNS if you’re on a LiteSpeed server). Cloudflare is a top performer on dnsperf.com and QUIC is needed for better geographic routing with Anycast.

Other DNS providers are slow and add latency. For example, GoDaddy and Kinsta’s DNS (Route 53) don’t perform well on dnsperf.com. While other DNS providers are unreliable: SiteGround’s DNS was blocked by Google for 4 days, causing 2 million domains to be deindexed from Google.

Cloudflare dns

How To Move Your DNS To Cloudflare

Sign up for Cloudflare through their website, add your website, and they will scan records. Cloudflare will eventually provide you with 2 nameservers. Login to your domain registrar (i.e GoDaddy/Namecheap) and find the option to change nameservers (usually in the DNS settings). Replace the nameservers with Cloudflare’s, then in Cloudflare, click ‘Done, check nameservers.’

Cloudflare change namesevers

How To Move Your DNS To QUIC (LiteSpeed Only)

 

3. Choose A Fast CDN

QUIC.cloud (on LiteSpeed) or Cloudflare with APO are both fast/affordable CDNs with full page caching. Dynamic/WooCommerce sites want Cloudflare Enterprise to further speed up dynamic requests with features like Argo Smart Routing (which can reduce your TTFB by 33%).

“Cloudflare Enterprise” has been thrown around a lot, but many hosts (Kinsta, WP Engine, Cloudways) only use partial or poorly integrated versions. Rocket.net’s Cloudflare Enterprise is ideal (what I use), but if you don’t want to switch to their hosting, use FlyingCDN via FlyingPress.

Cdn performance tracker
Check CDN Performance Tracker + cdnperf.com (however, it’s unclear which plans/features are used).

Rocket. Net true cloudflare enterprise

Cloudways cloudflare enterprise restricted access to features

Cloudflare enterprise integrations

 

4. Use Full Page Caching

Only a handful of CDNs support full page caching. Here are a few:

  • Cloudflare APO
  • QUIC.cloud’s CDN
  • SiteGround’s CDN (v2)
  • BunnyCDN (Perma-Cache)
  • Super Page Cache For Cloudflare plugin
  • Several Cloudflare integrations offered by managed cloud hosts.

With full page caching, Cloudflare’s APO improved TTFB by 72%. And since TTFB (server response time) is a large part of LCP/FCP, it’s one of the best way to improve core web vitals.

Cloudflare apo impact on ttfb fcp si

In APO’s post-launch report, mobile usually improves slightly more than desktop:

Cloudflare apo impact on ttfb

 

5. Use A CDN With Smart Routing

Some CDNs use “smart routing” which can improve latency by about 60%:

Argo latency reduction

This routes traffic through the fastest CDN network paths and is specifically good for WooCommerce or dynamic sites. Cloudflare has Argo Smart Routing (included with Rocket.net and Cloudways’ Cloudflare Enterprise). QUIC also uses advanced routing when using their DNS.

When using Cloudflare Argo, it’s best to also use Tiered Cache + cache reserve.

Cloudflare cache reserve

 

6. Use A CDN With Load Balancing

Load balancing steers traffic away from unhealthy origins and distributes traffic to the most available server pools. This can improve both latency and uptimes. You can either use a CDN that already supports load balancing (such as Rocket.net’s, Cloudways, or BunnyCDN). Or if you’re using Cloudflare directly, you will need to set this up manually using this video tutorial.

Cloudflare load balancing

 

7. Use Faster Hosting

“Hosting, hosting, hosting.”

-web.dev on reducing TTFB

The problem is, and Reddit (friends of /r/webhosting) partner with hosting companies and favor them through heavy censorship of comments/reactions. Some admins/mods are brand ambassadors working directly with hosting companies. Many rating sites can also be manipulated. This creates an echo chamber of “glowing reviews” designed to trick you by avoiding affiliate links, and often disclosures too.

Instead of getting tricked by unethical marketing, use my spreadsheets.

Recommendations: ChemiCloud for small static sites on a budget, NameHero or MechanicWeb if you need more resources (all shared). Scala, xCloud, or RunCloud if you need a VPS with performance/scalability. Rocket.net for WooCommerce/dynamic sites (managed cloud). GridPane for agencies managing multiple (or high traffic) sites.

What these have in common: faster stacks (7/8 use LiteSpeed), higher resource limits (i.e. better value of CPU cores/RAM), and more green. All 8 use NVMe SSDs, LiteSpeed’s PHP, and many have distinct advantages like LiteSpeed servers, faster CPUs, or robust Cloudflare Enterprise integration. What technological advantage does your host have?

Keycdn global ttfb
I use Rocket.net with their free Cloudflare Enterprise who averages a 100ms global TTFB. Static sites on shared plans can usually achieve 100ms when using QUIC.cloud’s CDN with one of the 3 shared hosts I recommended.

 

8. Enable TLS 1.3

Higher TLS versions reduce latency and improve security.

Use TLS 1.2 + 1.3 as preferred versions in your hosting account, then disable 1.0 + 1.1. You can also set TLS versions in Cloudflare under SSL/TLS → Edge Certificates → Minimum TLS Version.

Cloudways tls versions

Next, use this TLS checker to see which versions are enabled or disabled on your site. You can also use KeyCDN’s Performance Test to measure TLS speed and how the change impacts TTFB.

Tls checker

There are other Cloudflare settings that help too:

  • Full (Or Full Strict) SSL – this is what Cloudflare recommends anyway.
  • Always Use HTTPS – safe to use if all connections are served from HTTPS.
  • TCP Turbo (Pro Feature) – reduces latency by automatically choosing TCP settings.
  • Custom SSL (Pro Feature) – upload SSL to Cloudflare to terminate SSL/TLS at the edge.

 

9. Test Your Site For HTTP/3

Cloudflare’s test showed TTFB was 12.4% faster when using HTTP/3.

You can enable this in Cloudflare or by using QUIC.cloud’s CDN on LiteSpeed which also supports HTTP/3. When you’re done, use an HTTP/3 test to check whether your site supports it.

Http 3 check

 

10. Increase Cache TTL

A longer TTL (time to live) can lead to a better cache hit ratio. The more cache hits, the faster your TTFB will be. Google recommends caching static resources for 1 year (but WooCommerce sites can aim for about 1 month) which fixes serve static assets with an efficient cache policy in PSI. Depending on where your cache is stored, this can be done in your hosting account or CDN.

Nginx static cache expiry

 

11. Switch To A Faster Cache Plugin

Cache plugins reduce TTFB by improving server processing times and serving files directly (reducing PHP/MySQL queries). I recommend LiteSpeed Cache (if you’re on LiteSpeed) and FlyingPress in all other cases. WP Rocket has fallen behind and has barely released any new features since 2011 if you check the changelog. SiteGround Optimizer does an even worse job addressing web vitals and has ongoing compatibility issues if you check their support threads.

I personally moved from WP Rocket to FlyingPress and saw a big difference in core web vitals and real-world browsing speed. It was developed by Gijo Varghese who runs WP Speed Matters.

Omm switches to flyingpress

 

12. Reduce The Load On Your Server

If your CPU/memory usage are over 70%, visitors can experience lag.

The easiest way to reduce CPU usage is by using a hosting plan that uses LiteSpeed and includes more CPU cores/RAM (like as ChemiCloud, FastComet, or Rocket.net). Just by switching to LiteSpeed, people have seen a 75%+ reduction in CPU usage. LiteSpeed uses CPU/memory more efficiently, it’s faster, and can handle more traffic compared to Apache.

Litespeed apache cpu usage

There also several other ways to reduce CPU usage if you don’t want to switch hosts:

  • Remove resource hungry plugins (see list)
  • Limit heartbeat, autosaves, post revisions, XML-RPC
  • Replace wp-cron with a real cron job
  • Use your CDN for firewall + image optimization
  • Block bad bots
  • Protect the wp-login page
  • Limit preloading + cache clearing in cache plugins
  • Install Redis or Memcached with OPcache
  • Avoid using page builders/WooCommerce on cheap shared hosting

 

13. Use The Latest PHP Version

Higher PHP versions reduce TTFB because they handle more requests/second.

Login to your hosting account and update to the latest stable PHP version. It’s a good idea to keep other technologies updated as well (MySQL version, WordPress core, themes, plugins, etc).

Php 8. 1

 

14. Test With And Without Gzip/Brotli

Compressing pages with Gzip or Brotli can sometimes increase TTFB, so make sure you test this. Check if your host supports Gzip/Brotli compression (Brotli is generally faster than Gzip).

Brotli cpanel
Gzip or Brotli can usually be turned ON/OFF in your hosting account (screenshot is for cPanel)
Cloudflare brotli
Cloudflare also has an option to enable Brotli

 

15. Optimize Your Database

A bloated, unoptimized database can also make your site/TTFB slower.

While cache plugins clean some junk, you’ll want to use something like WP-Optimize to do a thorough cleanup. This lets you go through your plugin tables, see how much overhead they add, and remove tables left behind by old plugins. You might also see specific plugins/modules adding lots of database bloat. I did, so I disabled several Rank Math features like their Analytics.

Wp optimize unused database tables

To make your database more efficient, use Memcached (or Redis) and OPcache. These can usually be activated in your hosting account and I generally recommend Redis which is more powerful than Memcached. Once activated, some cache plugins can connect it (LSC, W3TC, SG Optimizer). If it doesn’t, check your host’s documentation on how to connect object cache. And if they don’t support it, use Docket Cache. Some hosts (like Rocket.net and Cloudways) support Redis Object Cache Pro which is especially beneficial for dynamic websites like WooCommerce.

Opcache memcached redis
Activate Redis (or Memcached) and OPcache in your hosting account (screenshot is for cPanel)
Litespeed cache object cache
Connect object cache using your cache plugin if it supports it

How do I reduce initial server response times in WordPress?

A fast host/CDN is the best way to reduce server response times (TTFB) in WordPress. Use a host with updated hardware/software (like LiteSpeed). For a CDN, use a service with a large network, full page caching, and smart routing. Using a close data center to users helps too.

How do I reduce server response times with Cloudflare?

Cloudflare improves TTFB with their fast CDN and DNS. You can use Cloudflare to further improve TTFB by using APO, Argo Smart Routing, and load balancing (all are paid services).

How do I reduce server response times with WP Rocket?

WP Rocket improves server response times (TTFB) by optimizing your caching, database, and several other features. However, it does a worse job with TTFB and core web vitals compared to FlyingPress + LiteSpeed Cache, especially when using their slow RocketCDN.

Which WordPress plugins reduce server response time?

Cache plugins (like LiteSpeed Cache and FlyingPress) and Cloudflare's plugin (which is used to setup full page caching) are the 2 best plugins to reduce server response times.

Cheers,
Tom

You Might Also Like:

Leave a Comment