How to Reduce WordPress TTFB Below 200ms on a Cheap VPS

WordPress time to first byte, usually shortened to TTFB, is the gap between a browser asking for a page and the first byte of the response arriving. When you want to reduce WordPress TTFB on a cheap VPS, that gap is the number to watch, because it captures everything your server does before it can send anything: DNS lookup, PHP execution, database queries, and any cache lookup in between. A 200ms target is realistic for a cached page on a small VPS, but it is a target, not a promise. An uncached page that runs dozens of queries will not hit it, and no plugin changes that fact.

This guide walks through measuring TTFB correctly, finding which part of the stack eats the time, and fixing each part in order of impact. Work through it in order. Guessing at fixes before you measure wastes time and often makes the site slower.

Measure Before You Try to Reduce WordPress TTFB

TTFB changes with every request, so one measurement tells you almost nothing. A cold cache, a busy neighbor on the same host node, or a slow DNS resolver can each add hundreds of milliseconds to a single test. Measure at least five times, drop the fastest and slowest, and average the rest. Repeat the same test after each change so you can see what actually moved.

The fastest check runs from your own terminal:

  • curl -o /dev/null -s -w "TTFB: %{time_starttransfer}snTotal: %{time_total}sn" https://example.com/
  • Run it five times and note the time_starttransfer value each time. That value is TTFB.
  • Test the homepage and one single post, since posts often run more queries than the homepage.

Browser devtools give you the same number with more context. Open the Network tab, reload, click the document request, and read the TTFB value under Timing. The Timing breakdown also shows DNS, connection, and waiting time separately, which tells you whether the delay sits in the network or on the server.

Where the Time Goes

Four stages make up almost all of TTFB on a typical WordPress VPS:

  • DNS lookup. Slow or distant nameservers can add 50 to 200ms before anything else happens. This shows up in devtools as DNS time, not waiting time.
  • PHP execution. Every uncached request runs WordPress core, your theme, and every active plugin. On a single small CPU core, that work alone often takes 300 to 800ms.
  • Database queries. WordPress runs dozens of queries per page. Slow queries, missing indexes from a plugin, or a database starved of RAM stretch this stage out.
  • Uncached pages. Logged-in users, carts, and pages excluded from cache always pay the full PHP plus database cost. A cached page skips most of it.

Your job is to find which stage dominates on your site, then attack that stage first. A site with 600ms of PHP time gains nothing from a faster DNS provider.

Fix 1: Serve Cached Pages

WordPress page caching is the single biggest TTFB win on a cheap VPS, because a cached page answers from Nginx or a cache plugin without running PHP or touching the database at all. A cached page that took 700ms to build can answer in 30 to 80ms. That is the difference between missing the 200ms target and beating it.

Set up full-page caching at the Nginx level if you can, or use a well-kept cache plugin if you cannot. Verify the cache actually hits: run the curl test twice and confirm the second run drops sharply. Exclude only what must stay dynamic, such as cart and checkout pages, and keep the rest cached. This is also why choosing enough RAM for your WordPress VPS matters: a cache plugin and an object cache both live in memory, and a server that swaps to disk under load will serve cached pages slowly anyway.

Fix 2: Tune PHP and OPcache

PHP-FPM settings decide how fast uncached requests run and how many the server can handle at once. Two settings matter most on a small VPS:

  • OPcache. Enable it and give it enough memory, typically 128MB, so PHP does not recompile every script on every request. Confirm it is on with a phpinfo() page or php -i | grep opcache, then delete the test page.
  • PHP-FPM process manager. On a 1 to 2GB VPS, pm = ondemand with a modest pm.max_children avoids the memory exhaustion that makes TTFB spike under traffic. Set max_children from real memory math: total RAM minus database and system use, divided by average PHP process size.

Keep PHP current. Each major PHP release has shipped real speed gains over the last several versions, and running an old release on a cheap VPS leaves free speed on the table. A PHP OPcache WordPress configuration like this cuts uncached response time before you touch any plugin. Test the upgrade on a staging copy first, since old plugins break on new PHP versions. If you are still setting the stack up, installing WordPress on a LEMP stack with a current PHP version gets all of this right from the start.

Fix 3: Clean Up the Database

WordPress database optimization pays off when a site has run for a year or more. Post revisions, expired transients, spam comments, and orphaned rows from deleted plugins pile up, and some plugins add queries that scan those tables on every page load. Clean revisions down to a sane limit with define('WP_POST_REVISIONS', 5); in wp-config.php, delete spam and trash on a schedule, and remove tables left behind by plugins you no longer use. Back up the database before you touch it.

Find the slow queries instead of guessing: enable the MySQL slow query log for a day, or use the Query Monitor plugin on a staging copy. A single plugin firing twenty queries on every page is a common find, and replacing it often cuts more TTFB than any server tweak. Give MariaDB or MySQL enough RAM to hold your working set: on a small VPS, an innodb_buffer_pool_size of 256 to 512MB is a reasonable starting point, and the exact value depends on how much RAM your whole stack has, which is why picking VPS specs for RAM, CPU, and storage up front saves painful resizing later.

Fix 4: Shorten the Network Path

Once server time is under control, the network stages start to matter. Move DNS to a fast provider with anycast nameservers and check the result in devtools: DNS time should drop to tens of milliseconds. Put a CDN in front of static assets and, where your setup allows it, in front of cached HTML too, so visitors reach a nearby edge node instead of your VPS on the other side of the world. Keep your VPS region close to most of your visitors: a server in Singapore serves Jakarta visitors far faster than one in Frankfurt, and no caching fixes physics.

Test the network path the same way you test the server. Run a disk and network speed test on your VPS to confirm the machine itself is not the bottleneck, then compare TTFB from two locations. A big gap between locations points at network distance, not at WordPress.

What a Cheap VPS Cannot Fix

Cheap VPS plans have hard limits, and honesty about them saves money. A single shared vCPU cannot run an uncached WooCommerce checkout in 200ms, no matter how you tune it. Heavy page builders, dozens of active plugins, and uncached dynamic pages all cost CPU time that a small plan simply does not have. If your uncached TTFB stays above 500ms after caching, PHP tuning, and database cleanup, the next step is either fewer plugins, a lighter theme, or a bigger plan, in that order.

Also accept that TTFB varies by location and by time of day. A test from next door to the data center will always beat a test from another continent, so judge your site by repeated tests from a location near your real visitors, not by the best number you ever saw.

A Repeatable Test Routine

Put the whole process into a routine you can rerun after every change:

  • Run the curl test five times on the homepage and one post, and record the median TTFB.
  • Check devtools Timing to split network time from server waiting time.
  • Change one thing only, then rerun the same test and compare medians.
  • Keep a short log of each change and its measured effect, so you can roll back a change that made things worse.

Work through caching first, then PHP, then the database, then the network path. Most cheap VPS WordPress sites land under 200ms on cached pages after the first two steps, and the remaining steps close the gap on uncached pages. If you hit a wall, the measurement log shows exactly where the time still sits, and that tells you whether the fix is a plugin removal, a theme change, or a plan upgrade.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.