In this article · 5 sections
- How to measure TTFB
- What causes slow TTFB
- Fixes, in order of impact
- 1. Page caching
- 2. Upgrade PHP
- 3. Optimise the database
- 4. Cut slow external calls
- 5. Audit plugins and code
- 6. Use a nearby data centre and a CDN
- 7. Fix redirects
- 8. Upgrade hosting when needed
- Monitor it
- FAQs
- Is TTFB a ranking factor?
- Why is TTFB slow only sometimes?
Time to First Byte (TTFB) is how long the browser waits before the server starts sending the page. If TTFB is slow, every other metric (LCP, page load time) suffers, because nothing can start until the first byte arrives. Here's how to reduce server response time on typical PHP and WordPress websites.
How to measure TTFB
- PageSpeed Insights: field data shows TTFB for real users; lab data flags "Reduce initial server response time"
- Chrome DevTools → Network: click the HTML document → Timing → "Waiting for server response"
- WebPageTest: test from locations near your audience
As a general target, aim for under about 0.8 seconds for real users. Faster is better.
What causes slow TTFB
- Overloaded or distant hosting: busy shared servers or data centres far from users
- No page caching: PHP and database work on every request
- Slow database queries: missing indexes, huge tables
- Heavy plugins running on every page load
- External API calls during page generation (reviews, currency, maps)
- Old PHP version
- Redirect chains before the real page loads
Fixes, in order of impact
1. Page caching
Serve pre-built HTML instead of generating each page: - WordPress: LiteSpeed Cache (on LiteSpeed hosting) or another cache plugin - Custom PHP: cache rendered pages or expensive sections for a few minutes - CDN edge caching for HTML where appropriate
See browser and server caching.
2. Upgrade PHP
Newer PHP versions run code faster. See upgrading PHP safely.
3. Optimise the database
Add indexes, remove slow queries, clean old data. See database optimisation.
4. Cut slow external calls
Cache API responses (e.g. Google reviews, exchange rates) for hours instead of calling them on every visit. Load third-party widgets in the browser after the page, not on the server.
5. Audit plugins and code
Profile which plugins or functions take the most time. Remove or replace heavy ones.
6. Use a nearby data centre and a CDN
For Indian audiences, choose servers in India or Singapore. A CDN can serve cached content from locations close to visitors. See what is a CDN.
7. Fix redirects
Make sure HTTP→HTTPS and www rules redirect in one step.
8. Upgrade hosting when needed
If a cached site is still slow, the server may be underpowered. See VPS and cloud options.
Monitor it
Re-test after each change. Track TTFB in Search Console/PageSpeed field data over the following weeks.
FAQs
Is TTFB a ranking factor?
TTFB isn't a Core Web Vital itself, but it strongly affects LCP, which is.
Why is TTFB slow only sometimes?
Cache misses, traffic spikes, cron jobs or backups running on the server can cause intermittent slowness.
Server and caching optimisation are part of Joboo Web's speed service and maintenance plans. Get your site checked.