TTFB on WordPress: Hosting, PHP and Database Fixes

Time to First Byte (TTFB) is how long a visitor waits before your server starts sending the page. Nothing can appear on screen before that first byte arrives, so a slow TTFB delays everything else, including…

TTFB WordPress Performance Guide
In this article
  1. What TTFB Is and What a Good Value Looks Like?
  2. Measure It Properly: Cached vs Uncached, Network vs Server
  3. Network Fixes: Redirects, DNS, Distance and CDN
  4. Hosting Fixes
  5. PHP Fixes
  6. Plugin and Theme Fixes
  7. Database Fixes
  8. When to Change Hosting
  9. Conclusion
  10. Frequently Asked Questions:

Time to First Byte (TTFB) is how long a visitor waits before your server starts sending the page.

Nothing can appear on screen before that first byte arrives, so a slow TTFB delays everything else, including your Largest Contentful Paint.

On WordPress, slow TTFB usually comes from one of four places: the network path, the hosting server, PHP and plugins, or the database.

This guide shows how to tell which one, and what to fix.

FoundHint Local SEO WordPress

Optimize your Google Business Profile without leaving WordPress

Connect your GBP profile, compare it with your website and fix the gaps FoundHint finds.

  • Business Profile audit and optimization
  • Google Post scheduling
  • Review management and replies
  • Local rank tracking on a map grid

What TTFB Is and What a Good Value Looks Like?

TTFB covers everything from the start of navigation until the first byte of the HTML response:

PartWhat happensCommon WordPress causes of delay
RedirectsBrowser follows one or more redirectshttp → https → www chains, old URLs
DNS lookupDomain name resolved to an IP addressSlow DNS provider
Connection and TLSSecure connection set upServer far from visitor, no HTTP/2 or HTTP/3
Server processingWordPress builds or serves the pageNo page cache, slow PHP, heavy plugins, slow database

TTFB isn’t a Core Web Vital, but it feeds into LCP. web.dev suggests as a rough guide:

RatingTTFB
Good0.8 seconds or less
Needs improvement0.8–1.8 seconds
PoorMore than 1.8 seconds

Since the LCP target is 2.5 seconds, a TTFB of 1.5 seconds leaves very little time for everything else.

Measure It Properly: Cached vs Uncached, Network vs Server

1. Check real-user TTFB. PageSpeed Insights shows field TTFB when CrUX has enough data. This tells you what real visitors experience.

2. Separate cached and uncached TTFB. Load a page in a private window twice. The first load may be uncached; the second should be cached (check response headers for a cache HIT, see Article 5).

  • Cached TTFB slow (well over a few hundred milliseconds): network or hosting problem, or the cache isn’t actually being served.
  • Cached fast, uncached slow: WordPress processing problem: PHP, plugins, theme or database. Visitors hit this on rarely visited pages, after cache purges, and when logged in.

3. Split network and server time. In Chrome DevTools → Network, click the HTML request and open Timing. “Waiting for server response” is mainly server processing; DNS, connection and SSL rows show network time. WebPageTest gives a similar breakdown from different locations.

4. Find slow code. On a staging site, install Query Monitor and load an uncached page. It shows page generation time, slow database queries, and which plugins or theme components produce them.

Network Fixes: Redirects, DNS, Distance and CDN

  • Remove redirect chains. Link directly to your final URL (https, with or without www, consistently). Update internal links and menus that point to redirected URLs.
  • Use a fast DNS provider. Many CDNs and hosts provide fast DNS.
  • Host close to your customers. For a local business, choose a data center in or near your customers’ region. A server on another continent adds connection time to every request.
  • Use a CDN if customers are spread out, or to cache full HTML at the edge.
  • Make sure HTTP/2 or HTTP/3 is enabled. Most modern hosts and CDNs do this by default.

Hosting Fixes

  • Server-level page caching. Serves pages without running PHP. Use your host’s cache if it has one (see Article 5).
  • Enough PHP workers. Each uncached request needs a PHP worker. If all are busy, requests queue and TTFB rises under traffic. Your host’s dashboard or support can tell you how many you have and whether requests are queuing.
  • Resources not shared too thinly. On busy shared servers, other sites can slow yours. Inconsistent TTFB (fast sometimes, very slow other times) is a common sign.
  • Modern server stack. Ask your host about the web server, PHP handler and whether OPcache and object caching are available.

PHP Fixes

  • Use a currently supported PHP version listed on WordPress’s official requirements page. Newer PHP versions are generally faster and receive security fixes. Test on staging first; very old plugins may not be compatible.
  • Confirm OPcache is enabled. It stores compiled PHP code so it doesn’t have to be recompiled on each request. Most hosts enable it by default; Site Health or your host’s PHP info can confirm it.
  • Reasonable PHP memory limit. Too low causes errors; it rarely speeds up a site by itself.

Plugin and Theme Fixes

Every active plugin can add work to every uncached request.

  • Use Query Monitor to find plugins with slow queries, many queries or high generation time.
  • Look for external HTTP requests during page load. Plugins that call outside APIs while building a page (for example, fetching feeds, license checks or remote data) can add seconds when that service is slow. Query Monitor lists HTTP API calls.
  • Remove plugins you don’t use, and replace heavy ones where a lighter option does the same job.
  • Check the theme. Heavy theme frameworks and builders can add processing time. Compare generation time with a default theme on staging.

Database Fixes

WordPress stores content, settings and plugin data in a MySQL or MariaDB database. Common causes of slow queries:

Autoloaded options. WordPress loads all “autoloaded” options from the wp_options table on every request. Plugins, including ones you’ve removed, can leave large autoloaded data behind.

Since WordPress 6.6, Site Health warns when autoloaded options are very large. Review what’s autoloading and clean up data from removed plugins, carefully and with a backup.

Expired transients. Temporary cached data can build up. Many optimization plugins can clear expired transients.

Post revisions and spam. Large numbers of revisions, spam comments and trashed items increase table size. Limit revisions and clean up periodically.

Slow queries from plugins. Query Monitor shows which queries are slow and which component runs them. Fix by replacing the plugin, changing its settings or, for developers, adding database indexes.

Object caching. A persistent object cache (Redis or Memcached) stores query results in memory. Most helpful for WooCommerce, membership sites and sites with many logged-in users.

WP-Cron. WordPress runs scheduled tasks when someone visits a page. On some sites, heavy cron jobs can slow page loads for the visitor who triggers them.

A common fix is disabling the visit-based trigger (DISABLE_WP_CRON in wp-config.php) and running WP-Cron from a real server cron job instead. Ask your host if they support this.

Always back up the database before cleaning it.

When to Change Hosting

Consider moving hosts when:

  • Cached TTFB is still slow after you’ve confirmed the cache is working.
  • TTFB varies widely without traffic spikes.
  • Your host can’t offer a supported PHP version, server-level caching or object caching.
  • Your server is far from your customers and the host has no closer data center.

Before moving, test a staging copy on the new host, compare cached and uncached TTFB from your customers’ region, and keep the old host until results are confirmed.

Conclusion

Fix TTFB by finding where the time goes.

Measure cached and uncached TTFB, split network and server time, then fix the right layer: redirects and distance, hosting and caching, PHP version and OPcache, plugins with Query Monitor, and database bloat such as autoloaded options.

Faster TTFB gives LCP more room.

For the wider picture, see FoundHint’s guide on how to improve Core Web Vitals on your WordPress site.

FoundHint Local SEO WordPress

Optimize your Google Business Profile without leaving WordPress

Connect your GBP profile, compare it with your website and fix the gaps FoundHint finds.

  • Business Profile audit and optimization
  • Google Post scheduling
  • Review management and replies
  • Local rank tracking on a map grid

Frequently Asked Questions:

What is a good TTFB for WordPress?

As a rough guide, 0.8 seconds or less. Cached pages on good hosting are often much faster.

Why is my TTFB fast sometimes and slow other times?

Usually some requests are cached and others aren’t, or the server is under varying load. Check cache headers and your host’s resource usage.

Does a caching plugin fix TTFB?

For cached pages, usually yes. It doesn’t help uncached requests, logged-in users or pages excluded from cache. Those depend on PHP, plugins and the database.

Do more plugins mean slower TTFB?

Not always. The number matters less than what each plugin does. One heavy plugin can slow a site more than twenty light ones.

Does server location matter for a local business website?

Yes. Hosting near your customers reduces connection time. A CDN helps if you can’t choose a nearby server.

Written by

Ready to Take Control of Your Local SEO?

Find local SEO issues, understand what needs improvement, and manage your local search optimization from WordPress.