Time to First Byte: Where a WordPress Server Spends Its Time
Profiling a request from DNS to first byte, finding the plugin or query that owns the delay, and fixes that cut hundreds of milliseconds.

In this article
Time to First Byte, or TTFB, measures how long a browser waits from starting a request until the first byte of the response arrives. Every other loading metric sits on top of it: the page cannot start rendering, and the largest image cannot start downloading, until the HTML begins to arrive. A slow TTFB makes a well-optimised front end feel slow.
Most advice on WordPress TTFB is a list of tips: install a cache, upgrade PHP, change host. Those can help, but they do not tell you where your own time is going. This guide is a profiling walkthrough instead: split the number into its parts, find out whether the cache is really being hit, then find the plugin, query or outbound request that owns the delay.
Cache hit or miss, and why your own visits are always the hit
Page caching is the biggest single improvement for most WordPress sites, because a cached page is served without running PHP or querying the database. The catch is that your own testing nearly always hits the cache. You visit the page repeatedly, so it is warm, and if you are logged in, many caches bypass you entirely and you see a slow uncached page that visitors never see.
Check the response headers. Most caching plugins, hosts and CDNs add a header that shows a hit or a miss. Test in a private window, logged out, and request a page twice: the first request may be a miss and the second should be a hit. If both are misses, find out why. Common causes are cookies set on every visit, query strings from marketing links, a plugin that marks pages as uncacheable and very short cache lifetimes.
This is the usual explanation for "fast for me, slow for them". Real visitors arrive on pages that have expired from the cache, with campaign parameters, or on a server in another region. Measure what they get, using field data from Search Console's Core Web Vitals report or real-user monitoring, not only lab tests.
Profiling with Query Monitor: hooks, queries, HTTP calls
When an uncached page is slow, Query Monitor is the quickest way to see why. On a staging copy, or on production for administrators only, it shows the total generation time, every database query with its caller and duration, the hooks that ran and every outbound HTTP request made while building the page.
Sort queries by time and by caller. A plugin running dozens of small queries on every page, or one query taking hundreds of milliseconds, is usually visible within minutes. The components view groups time by plugin and theme, which makes it easier to decide whether to fix, replace or remove something. Measure before and after each change, on the same page and the same conditions.
- Total page generation time and peak memory
- Slowest database queries and the plugin that ran them
- Duplicate queries that could be cached
- Outbound HTTP requests and how long each took
The blocking outbound request that nobody suspects
Some of the worst TTFB problems are not in the database at all. A plugin checks a licence server, fetches a social media count, calls a currency API or loads remote fonts on the server side, synchronously, while the page is generated. When that remote service is slow, every uncached page waits for it, and when it is down, pages can hang until the request times out.
Query Monitor's HTTP API calls panel lists these requests with their timing. Move such work out of the page request: fetch the data in a scheduled task, store it in a transient or option, and render from the stored copy. Set short timeouts on any request that must stay synchronous, and make sure the page still renders if the remote service fails.
Slow queries: finding them and indexing for them
Some slow queries only appear under real traffic or with a large dataset, so they never show up on staging. Enable the MySQL or MariaDB slow query log on the server for a short period, with a threshold such as half a second, and review what it collects. Repeated entries from the same plugin point to the culprit.
Common causes on WordPress are meta queries that filter on post meta values, which can scan a large table, searches using LIKE with a leading wildcard, and options autoloaded on every request that have grown very large. Fixes range from adding an index for a heavily used meta key, to rewriting the query, to storing the value in a dedicated column or table. Object caching with Redis helps repeated queries but does not fix one bad query. The database optimisation guide and the Redis object cache guide go deeper.
Geography: where your server is versus where your customers are
Distance adds time to every round trip, and a new connection needs several of them. A site hosted in the United States serving customers in India pays that cost on every uncached request. Host close to your main audience where you can, and if your customers are spread across regions, put a CDN in front of the site so connections terminate nearby.
A CDN that only caches images helps less than one that can also cache HTML for logged-out visitors. If you enable full-page caching at the edge, make sure it is purged when content changes, and that logged-in users, carts and checkout bypass it. The Core Web Vitals checklist and the hosting comparison cover the wider picture, and the WordPress performance and maintenance service explains how I approach slow sites.
Frequently asked questions
What is a good TTFB for a WordPress site?
web.dev suggests 0.8 seconds or less as a rough guide for most sites, measured at the 75th percentile of real visits. Cached pages served from a nearby server or CDN can be much faster than that.
Why is my TTFB high even with caching?
Usually because real visitors miss the cache: pages have expired, URLs carry query strings, cookies make pages uncacheable or the server is far from the visitor. Check the cache headers in a logged-out private window to confirm hits.
How do I find which plugin is slowing the server down?
Use Query Monitor on an uncached page to see generation time by component, the slowest database queries and outbound HTTP requests, then confirm with the database slow query log under real traffic.
Does hosting location affect TTFB in India?
Yes. Every round trip to a distant server adds delay, so a site serving Indian customers from another continent has a slower first byte. Hosting in or near India, or using a CDN that caches HTML close to visitors, reduces it.
Topics
- WordPress TTFB
- reduce server response time WordPress
- WordPress slow first byte
- WordPress Query Monitor profiling