Skip to content
General

How to Reduce Server Response Time (TTFB)

Reduce server response time with page caching, a current PHP version, a lean database, a CDN and the right hosting. Here is how to measure TTFB and fix it.

By Tremhost Experts Updated November 5, 2026 4 min read

To reduce server response time, make the server do less work for each request and put it closer to your visitors. In practice that means full-page caching, a current PHP version, a lean and tidy database, a CDN, and hosting with enough resources on fast storage. Start by measuring Time to First Byte (TTFB), fix the biggest cause, then measure again.

What server response time and TTFB mean

Server response time is how long the server takes to start sending a page after a browser asks for it. It is usually measured as Time to First Byte (TTFB): the time from the request to the first byte of the response arriving in the browser.

TTFB is made up of several parts:

  • Redirects, if the address the visitor typed sends them elsewhere first.
  • DNS lookup, turning your domain into an IP address.
  • Connection and TLS setup, opening a secure connection to the server.
  • Server processing, running PHP, querying the database and building the page.

Google’s web.dev guidance treats a TTFB of 0.8 seconds or less as good for most sites, and Lighthouse flags a page when the main document takes longer than 600 milliseconds to respond. A slow TTFB delays everything after it, including Largest Contentful Paint.

How to measure it

  • Browser developer tools. Open the Network tab, reload, click the page request and look at “Waiting for server response”.
  • PageSpeed Insights. Shows lab results and, for busier sites, real-user data from the Chrome UX Report.
  • Command line. curl -o /dev/null -s -w “%{time_starttransfer}” https://example.com prints the time to first byte in seconds.

Test several times, from more than one location, and with the cache both warm and cold. One reading on its own can mislead.

1. Use full-page caching

Without caching, a WordPress page runs PHP and many database queries on every visit. A page cache stores the finished HTML and serves it directly, which cuts processing time sharply. On LiteSpeed servers, the LiteSpeed Cache plugin for WordPress works with the server’s built-in cache. On other servers, use a caching plugin or server-level cache that suits your stack. Exclude carts, checkout and account pages from the cache.

2. Run a current PHP version

Newer supported PHP versions are generally faster and receive security fixes. Check that your theme and plugins support the version, then switch in cPanel. Our help article shows how to change your PHP version. Make sure OPcache is enabled, so PHP does not recompile scripts on every request.

3. Add object caching for dynamic sites

Pages that cannot be fully cached, such as logged-in dashboards and shops, still repeat the same database queries. An object cache such as Redis keeps those results in memory. Use it where your host supports it.

4. Clean up the database and plugins

  • Remove plugins you do not use, and replace heavy ones that run on every page.
  • Delete old post revisions, spam comments and expired temporary data.
  • Look for slow queries with a tool such as Query Monitor on WordPress, and add database indexes where a developer confirms they help.
  • Avoid running scheduled tasks on page loads. On busy sites, trigger WordPress cron from a real server cron job instead.

5. Use a CDN and cache at the edge

A content delivery network such as Cloudflare serves cached files from a data centre near each visitor and keeps connections to your server warm. With the right cache rules, it can also serve cached HTML, which removes most of the server processing time for visitors who are not logged in. Cloudflare has a data centre in Harare, which helps visitors in Zimbabwe.

6. Remove redirect chains

Every redirect adds a full round trip. Link to your final URL, and make sure http, https, www and non-www all redirect once, straight to the version you use.

7. Host close to your visitors on adequate resources

Distance adds delay to every round trip. Choose a server location near most of your visitors. Then check resources: if your site regularly hits CPU or memory limits, no amount of tuning will fix it. Fast NVMe storage helps database-heavy sites. Move to a larger plan, managed WordPress hosting or a VPS when the site has outgrown its plan.

8. Keep the protocol stack modern

HTTP/2 or HTTP/3 and TLS 1.3 reduce connection setup time. Most modern hosts and CDNs enable these by default; confirm yours does.

Frequently asked questions

What is a good TTFB?

Google’s web.dev guidance suggests 0.8 seconds or less as a rough target for most sites. Cached pages served from a CDN are often much faster.

Does TTFB affect SEO?

TTFB is not a Core Web Vital itself, but it feeds into Largest Contentful Paint, which is. A slow server also makes the site feel slow to visitors.

Why is my TTFB fast sometimes and slow at other times?

Usually because some requests hit the cache and others do not, or because the server is busier at certain times. Test logged out, more than once, and check cache headers.

Will a CDN fix a slow server?

It helps cached pages a lot. Uncached pages, such as checkout and logged-in areas, still depend on your server, so fix caching and resources too.

Next step

Tremhost web hosting runs on LiteSpeed with NVMe storage. To add Cloudflare Pro, configured and monitored by Tremhost, see Armor Guard, or start with the free 15-day Cloudflare trial.

Ask us on WhatsApp