Time to First Byte (TTFB) in WordPress & WooCommerce: Complete Server & Edge Guide
Every millisecond your server spends booting PHP, querying MySQL, or negotiating cross-ocean TLS adds directly onto First Contentful Paint and Largest Contentful Paint. Learn how to dissect all 5 phases of TTFB and bring WordPress origin response down to ~14 ms.

- Official CrUX Threshold (
p75):<= 800 millisecondsisGood,800 – 1,800 msNeeds Improvement, and> 1,800 msisPoor—while Google Lighthouse flags Reduce initial server response time whenever server waiting exceeds600 ms. - Because browsers cannot discover CSS, fonts, or hero images until byte #1 of HTML arrives, a
1.2 sTTFBconsumes nearly half of your entire2.5 sLCPbudget before rendering even starts! - Uncached WordPress spends
85%+ofTTFBinside Server Waiting (requestStart -> responseStart) bootingwp-settings.php, autoloading bloatedwp_options, and running80–250SQL queries. - KadiCache solves all 3 server tiers in Free Core: Early PHP Drop-In (
~14 msguest HTML), 7-Driver Object Cache (45–70%faster dynamic/checkout/& misses), and Cloudflare APO / Edge Rules (15–35 msworldwide).
Table of Contents (9 sections)
- Why TTFB Is the Foundation of Every Other Speed Metric
- Dissecting the 5 Sequential Sub-Phases of TTFB (NavigationTiming v2)
- Why Uncached WordPress Spends 900 – 2,200 ms Inside Phase 5 (Server Waiting)
- The 3-Layer KadiCache Architecture for Sub-25ms TTFB Everywhere
- Layer 1: Pre-WordPress Early PHP Delivery (~14 ms Guest Origin TTFB)
- Layer 2: 7-Driver Persistent Object Cache + Autoload Bloat Cleanup (Dynamic & Checkout TTFB)
- Layer 3: Global Edge Caching (15 – 35 ms Worldwide via Cloudflare)
- Measuring Exact TTFB Breakdown in Terminal (curl) & Chrome DevTools
- Managed WordPress Hosts, Nginx fastcgi_cache & Coexistence Mode
Why TTFB Is the Foundation of Every Other Speed Metric#
Time to First Byte (TTFB) measures the elapsed milliseconds between the browser initiating a page navigation (startTime = 0) and receiving the very first byte of the HTTP response body (responseStart). While TTFB is a diagnostic metric rather than one of the three direct ranking Core Web Vitals, it acts as the hard floor beneath FCP and LCP:
- It is physically impossible for
FCPorLCPto be faster thanTTFB. - If a shared-hosting WooCommerce store has a
1,650 msTTFBon mobile 4G, you only have850 msleft to download stylesheets, parse fonts, fetch a120 KBhero photo, and paint the screen before failing Google’s2,500 msLCPlimit! - Conversely, dropping
TTFBfrom1,100 msdown to14–35 msimmediately gifts your frontend1,065 msof extra breathing room on every single visit.
Dissecting the 5 Sequential Sub-Phases of TTFB (NavigationTiming v2)#
When you hover over the top Document bar inside Chrome DevTools -> Network -> Timing, TTFB is actually the sum of five distinct network and server stages:
Sub-Phase (PerformanceNavigationTiming) | Healthy Target | What Happens Under the Hood | Common WordPress Mistake |
|---|---|---|---|
1. Redirect Duration (redirectEnd - redirectStart) | 0 ms | HTTP 301/302 hops before reaching final URL | Linking internal menus or Google Ads to http://example.com/shop -> https://www.example.com/shop/ (2 wasted round-trips!) |
2. DNS Lookup (domainLookupEnd - domainLookupStart) | < 25 ms | Resolving example.com to an IP address | Slow registrar nameservers with 60s TTL instead of Anycast DNS (Cloudflare / Route53) |
3. TCP + TLS Handshake (connectEnd - connectStart) | < 60 ms | TCP SYN/ACK + TLS 1.3 key exchange | Legacy TLS 1.2 only (2 round-trips), HTTP/3 QUIC disabled, or origin server 8,000 km from visitors |
4. Early 103 Hints Window (Optional) | Parallelizes CSS/Fonts! | Edge sends <link rel="preconnect/preload"> while origin responds | Leaving Cloudflare Early Hints (103) turned off |
5. Server Waiting (Waiting for server response) | < 50 ms (~14 ms HIT) | PHP-FPM + WordPress core + MySQL query execution | Uncached WordPress boot (600 – 2,200 ms), ad query-string misses (?fbclid=), or 3 MB autoloaded wp_options! |
Why Uncached WordPress Spends 900 – 2,200 ms Inside Phase 5 (Server Waiting)#
Unlike static .html sites, an uncached WordPress request triggers a heavy server-side sequence on every single pageview:
- Booting PHP & Loading 40+ Plugins:
index.php->wp-load.php->wp-settings.phploads hundreds of PHP class files across WordPress core, WooCommerce, Elementor/Divi, SEO plugins, and security firewalls. - Loading
wp_options(wp_load_alloptions()): Before rendering a single template tag, WordPress executesSELECT option_name, option_value FROM wp_options WHERE autoload IN ('yes', 'on', 'auto'). On mature stores where retired plugins left behind megabytes of serialized arrays, deserializing2.5 MBof autoloaded options burns180 – 450 msof PHP CPU on every request! - Running
80 to 250MySQL Queries: Mega-menus, widget sidebars, WooCommerce productmeta_query/tax_queryjoins, and translation lookups hammer InnoDB. - Silent Cache Bypasses on Paid Ads & Empty Sessions: Even sites that installed a basic cache plugin often suffer
60%cache misses because Facebook (?fbclid=...), Google Ads (?gclid=...), or TikTok (?ttclid=...) append unique query strings—or a currency/cart plugin sets a session cookie on page 1!
The 3-Layer KadiCache Architecture for Sub-25ms TTFB Everywhere#
Fixing TTFB reliably across anonymous readers, paid ad traffic, international visitors, and logged-in WooCommerce checkouts requires three coordinated layers—all included in KadiCache Free Core:
Layer 1: Pre-WordPress Early PHP Delivery (~14 ms Guest Origin TTFB)#
When Early delivery (advanced-cache.php) is active inside WP Admin -> KadiCache -> Cache (EarlyRequestServer.php):
- WordPress’s
wp-settings.phphands control towp-content/advanced-cache.phpbefore loading plugins, themes, or opening a MySQL connection (0SQL queries!). TargetPath.phpautomatically strips 20+ marketing tracking parameters (utm_*,fbclid,gclid,msclkid,ttclid,_gl) from the cache lookup key—so paid ad clicks hit warm.html.gzsnapshots at99%+hit rate while browser analytics scripts still read the full URL in the address bar (Mobile, Cookies & Query Strings).- Conditional
304 Not ModifiedValidators (ETag/If-None-Match): Repeat visitors revalidate unchanged pages in< 8 mswith0 bytesof HTML body transfer. - 60-Second Soft Purge Grace: When an editor updates a post, stale cached HTML continues serving for up to 60 seconds (
X-KadiCache: STALE) while one background worker rebuilds the page—preventing traffic-spike MySQL stampedes!
Layer 2: 7-Driver Persistent Object Cache + Autoload Bloat Cleanup (Dynamic & Checkout TTFB)#
What about requests that must stay dynamic—such as /cart/, /checkout/, /my-account/, logged-in wp-admin editors, or cold cache misses?
- Enable Persistent Object Cache (
ObjectCacheEngine.php): OpenWP Admin -> KadiCache -> Object Cache(Object Cache Guide) and enableRelay,PhpRedis,PhpStreamRedis,Memcached,APCu, orSQLite WAL. Combined with 200-key Route Batch Prefetch and Atomic Split Alloptions, dynamic checkout and adminTTFBdrops by45% to 70%. - Inspect & Trim Oversized Autoloaded Options (
AutoloadAnalyzer.php): Runwp kadicache object-cache info(or check the Autoloaded Options panel insideObject Cache) to pinpoint any plugin storing> 800 KBinwp_options, and run Safe Database Cleanup weekly.
Layer 3: Global Edge Caching (15 – 35 ms Worldwide via Cloudflare)#
For stores serving visitors across multiple continents, connect WP Admin -> KadiCache -> Cloudflare (Cloudflare 5-Tab Guide):
- Turn ON
HTTP/3 (QUIC),0-RTT Connection Resumption,Brotli, andEarly Hints (103)inSpeed & Network. - Enable either Free Edge HTML Cache Rule (
CloudflareEdgeRules.php— works on$0/moFree Cloudflare plans!) or Cloudflare APO so anonymous HTML serves from the nearest city while WooCommerce cart/account cookies bypass cleanly.
Measuring Exact TTFB Breakdown in Terminal (curl) & Chrome DevTools#
Use this single curl command from any terminal to measure DNS, TCP, TLS, and exact TTFB (time_starttransfer) alongside KadiCache’s diagnostic headers—without any browser extension noise:
curl -sI -o - "https://your-site.com/?utm_source=test_ad" -w "\n---\nDNS: %{time_namelookup}s | TCP: %{time_connect}s | TLS: %{time_appconnect}s | TTFB: %{time_starttransfer}s\n" | grep -E "HTTP/|X-KadiCache|Server-Timing|CF-Cache-Status|DNS:"Or paste this PerformanceNavigationTiming snippet in Chrome DevTools -> Console on any live page:
const [nav] = performance.getEntriesByType("navigation");
console.table({
totalTtfbMs: Math.round(nav.responseStart - nav.startTime),
redirectMs: Math.round(nav.redirectEnd - nav.redirectStart),
dnsMs: Math.round(nav.domainLookupEnd - nav.domainLookupStart),
tcpPlusTlsMs: Math.round(nav.connectEnd - nav.connectStart),
serverWaitingMs: Math.round(nav.responseStart - nav.requestStart),
serverTiming: (nav.serverTiming || []).map((s) => `${s.name}:${s.description}`).join(", "),
});Managed WordPress Hosts, Nginx fastcgi_cache & Coexistence Mode#
If your site runs on a managed platform such as Kinsta, WP Engine, Cloudways, SiteGround, Pantheon, or Pressable, server-level Nginx fastcgi_cache or Varnish already sits ahead of PHP-FPM:
- Automatic Coexistence Mode: KadiCache detects 22 managed-host drop-ins and reverse proxies (Coexistence & Managed Hosts Guide), keeping your host’s edge HTML cache in charge of
TTFBwhile KadiCache synchronizes surgical content purges and powers your frontend Core Web Vitals (Cloud RUCSS,Improve LCP,Delay JS, andCookieless RUM). - PHP 8.2 / 8.3 + OPcache Tuning on Custom VPS: On self-managed Ubuntu / Debian servers, verify
opcache.memory_consumption=256andopcache.validate_timestamps=0(or2s) soEarlyRequestServer.phpand WordPress core execute straight from shared-memory bytecode with zero.phpdisk stat overhead.
PageSpeed & Lighthouse Warnings Directly Affecting TTFB
Google Lighthouse flags “Reduce initial server response time” the instant your main HTML document takes longer than 600 milliseconds to deliver its first byte. Eliminate cold PHP/MySQL boot delays and reach ~14 ms in KadiCache Free Core.
Lighthouse triggers “Serve static assets with an efficient cache policy” when local CSS, JS, WOFF2 fonts, or WebP images ship missing or short Cache-Control max-age headers—forcing repeat shoppers to re-download unchanged assets.
TTFB Frequently Asked Questions
Is TTFB a direct Google Search ranking Core Web Vital?
Why is Google’s Good TTFB threshold 800 ms when KadiCache targets ~14 ms?
Why is my homepage TTFB 18 ms, while my /checkout/ TTFB is 620 ms?
Does enabling Sitemap Preload improve real-visitor TTFB?
Does Cloudflare Flexible SSL hurt TTFB (or cause redirect loops)?
Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.
Configure advanced-cache.php, Soft Purge, and nonce-safe TTLs.
Cut uncached checkout and admin SQL latency with Redis, Relay, or APCu.
See how sub-25ms TTFB unlocks sub-1.2s mobile LCP.
Eliminate render-blocking CSS and fonts between TTFB and first paint.