Quick answer: Measure before changing anything: curl -w timings split the delay between network, server processing (TTFB) and content download. High TTFB points at the application/database, slow download at page weight or network, and "everything slow including SSH" at server resources. Fix the measured layer, not the guessed one.

Overview

"The site is slow" has four independent suspects: server resources, application code, database, and network/page weight. Each has a cheap test. This guide runs them in order of likelihood and effort.

Before you start

  • SSH access and one reproducibly slow URL.

Step-by-step guide

  1. Split the time:
    curl -o /dev/null -s -w 'dns: %{time_namelookup}s connect: %{time_connect}s ttfb: %{time_starttransfer}s total: %{time_total}s\n' https://yourdomain.com/
    TTFB > 1s = server-side processing; big gap between ttfb and total = heavy page or slow link.
  2. Rule out resource starvation: CPU and RAM quick checks; also df -h (full disks slow everything).
  3. High TTFB path: enable the MySQL slow query log; add missing indexes; enable application caching (object cache, page cache, OPcache for PHP).
  4. Heavy page path: compress images, enable gzip/brotli, reduce third-party scripts. The browser dev-tools waterfall names the heaviest assets.
  5. If the same page is fast locally (curl from the server to 127.0.0.1) but slow remotely, test the network path — see network speed lower than expected.

Common issues

  • No caching at all: every request hits PHP+DB — the single biggest win on most sites.
  • Slow only at fixed hours: cron jobs/backups competing for I/O.
  • Far-away audience: physics — serve users from the nearest location or add a CDN.
  • Swapping server: RAM pressure turns everything sluggish; check free -h first.

When to contact support

If measurements show the network leg is slow to all destinations, or performance dropped without any change on your side, open a ticket with the curl timings and, for network legs, MTR output both directions.

Frequently asked questions

What is TTFB and what does a high value mean?

Time To First Byte is how long the server thinks before sending the first byte. Values above roughly one second point to application or database work, not to network or page size.

What single change speeds up a typical dynamic site the most?

Caching: a page cache plus an object cache turns most requests into memory reads instead of PHP and SQL work, and routinely cuts response times by an order of magnitude.

Related articles

Need a hand? Contact Cloud2Y support →

Was this answer helpful? 0 Users Found This Useful (0 Votes)