↑ ↓ select, Enter open, Esc close

Compare the response time of a PHP page with a static file

Adjust the values, the command updates live
user@server
for u in https://example.com/ https://example.com/wp-includes/css/dist/block-library/style.min.css; do curl -o /dev/null -s -w "%{time_starttransfer}s TTFB  $u\n" "$u"; done

Requests a PHP-generated page and a static file from the same domain one after the other. If the static file is fast and the PHP page slow, the problem lies in PHP, the database or plugins. If both are slow, the network, TLS or an overloaded web server are more likely the cause.

Note: Multiple runs smooth out outliers, see the entry on measuring TTFB repeatedly. A page cache can make the PHP page appear faster than it is without the cache.

Also searched as

  • is php or the server slow
  • narrow down slow wordpress response time
  • ttfb dynamic vs static
  • why is my website slow

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.