Guides

How to reduce TTFB on shared hosting

TTFB (time to first byte) is the time from a request to the first byte of the server's response. On shared hosting it is often high because of missing caching, heavy code, or an overloaded server; these steps help lower it if a test shows TTFB above 0.5-0.8 seconds.

Check your site

>
  1. Turn on server-side caching

    Full page caching has the biggest effect on TTFB. Install a cache plugin (LiteSpeed Cache on LiteSpeed hosting) or enable caching in your panel so the server returns a ready page instead of generating it every time.

  2. Update your PHP version

    In cPanel open Select PHP Version and pick PHP 8.1 or newer. Modern PHP runs code several times faster than the old 7.x, and TTFB drops right away.

  3. Remove heavy queries and plugins

    Slow code and extra database queries make the server think for too long. Disable plugins you do not need, and on complex pages check for slow database queries.

  4. Enable OPcache and object cache

    OPcache keeps compiled PHP in memory and is usually available under Select PHP Version, on the Extensions tab. If your host offers Redis or Memcached, turn on an object cache so the site does not hit the database on every request.

  5. Put a CDN in front of the site

    A CDN (such as Cloudflare) serves cached pages from the node closest to the visitor, so the first byte arrives faster, especially for an overseas audience.

  6. Check your account load

    On CloudLinux shared hosting the limits are visible in cPanel under Resource Usage. If you keep hitting CPU or Entry Processes, the server queues requests and TTFB climbs, so lighten the site or review your plan.

How to verify the result

Measure TTFB with the TechGuard speed tool before and after: the value should settle closer to 0.2-0.3 seconds. Run the test a few times, since the first request after a change is not yet cached.

Tip: If TTFB spikes only under load, the cause is usually noisy neighbors on the shared server or your account limits, not your own code.

Related guides

Found problems?

Slow hosting, SSL trouble or frequent downtime? Move to TomisHost: fast hosting with free SSL, daily backups and free migration help.

TomisHost hosting