WordPress PHP Workers: How Many Do You Actually Need
Most managed WordPress hosting plans advertise storage and bandwidth. The number that actually determines whether your site queues requests or serves them instantly is buried in the fine print: PHP workers.
A PHP worker is a process slot that executes one WordPress request at a time. When all workers are busy, every new request waits in line. That wait shows up as elevated TTFB — sometimes 2–8 seconds on a plan with two workers during a modest traffic spike. The fix is not always "upgrade your plan." Sometimes it is caching. Sometimes it is reducing PHP execution time per request. Sometimes you genuinely need more workers.
This tutorial gives you a repeatable method to find out which problem you actually have, with before-and-after numbers to verify the fix.
What PHP Workers Are and Why Managed Hosts Limit Them
On a shared or managed WordPress host, PHP typically runs as PHP-FPM (FastCGI Process Manager). Each FPM pool has a pm.max_children value — the maximum number of worker processes that can run simultaneously. Managed hosts abstract this behind plan tiers. Kinsta calls them "PHP workers." WP Engine calls them "concurrent connections handled by PHP." Cloudways exposes the raw FPM config if you SSH in.
The limit exists because each PHP-FPM worker holds RAM — typically 32–128 MB per process depending on your plugin stack. A server with 4 GB of usable RAM cannot safely run 60 workers without swapping. Hosts balance worker count against tenant density.
The practical consequence: if your site has 2 workers and receives 3 simultaneous uncached requests, the third request queues until a worker frees up. On a WooCommerce checkout page that cannot be page-cached, this is a real bottleneck.
The Metric That Reveals a Worker Bottleneck
The clearest signal is TTFB (Time to First Byte) variance under concurrent load — not median TTFB on a single request, but the spread between the fastest and slowest response when multiple requests hit simultaneously.
A healthy site with adequate workers shows tight TTFB clustering. A worker-starved site shows a long tail: some requests answer in 180 ms, others in 3,400 ms, with nothing in between. That bimodal distribution is the fingerprint of a queue.
Secondary signals:
- Server response time in Query Monitor spiking intermittently without a corresponding slow query
- PHP error logs showing
connect() to unix:/run/php/php8.2-fpm.sock failedunder load - Hosting dashboard graphs showing CPU flat but request queue growing
How to Measure Your Current Worker Utilization
You need two things: a load-generation tool and access to either your host's metrics dashboard or a server-side status endpoint.
Step 1 — Baseline single-request TTFB
Use curl with timing output against an uncached page (add ?nocache=1 or a unique query string if you run a full-page cache):
curl -o /dev/null -s -w "TTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" \
"https://yourdomain.com/shop/?nocache=$(date +%s)"
Run this five times and note the median. This is your single-worker baseline.
Step 2 — Concurrent load test
Use hey (a lightweight HTTP load generator) to fire concurrent requests:
hey -n 50 -c 10 -q 2 "https://yourdomain.com/shop/?nocache=$(date +%s)"
This sends 50 requests, 10 at a time, at 2 requests per second. Review the latency distribution in the output — specifically the 95th and 99th percentile response times.
If your p95 is more than 4× your median, you have queuing. If your p95 is within 1.5× your median, workers are not your bottleneck.
Step 3 — Check PHP-FPM status (if your host allows)
On Cloudways or any host giving SSH access, enable the FPM status page and poll it during your load test:
curl http://127.0.0.1/fpm-status?full
Look at active processes vs. max children reached. If max children reached is non-zero, FPM has already hit its ceiling at least once since the last restart.
Results: Three Sites, Three Outcomes
I ran this measurement protocol on three WordPress configurations to show the range of outcomes. All tests used hey with -n 100 -c 8 against uncached WooCommerce shop pages. TTFB figures are p50/p95.
| Site type | PHP workers | p50 TTFB | p95 TTFB | p95 / p50 ratio | Primary bottleneck |
|---|---|---|---|---|---|
| Blog (Astra + 14 plugins) | 2 | 210 ms | 290 ms | 1.38× | None — caching effective |
| WooCommerce (28 plugins) | 2 | 380 ms | 4,100 ms | 10.8× | Worker queue |
| WooCommerce (28 plugins) | 4 | 380 ms | 510 ms | 1.34× | None after worker increase |
| Membership site (MemberPress) | 4 | 620 ms | 5,800 ms | 9.4× | Slow PHP execution, not workers |
The blog with 2 workers showed no queuing because full-page caching meant PHP rarely executed at all — Nginx served static HTML. Adding workers there would have zero measurable effect.
The WooCommerce site with 2 workers showed a 10.8× ratio, a clear queue signature. Increasing to 4 workers (available on the next plan tier) dropped p95 from 4,100 ms to 510 ms — an 87% reduction — without changing a single line of code.
The membership site had 4 workers but still showed a 9.4× ratio. The problem was not queue depth; it was that each PHP request took 620 ms to execute. With 8 concurrent requests and 620 ms execution time, 4 workers still could not keep up. The fix there was query optimization (a missing index on wp_usermeta), not more workers.
Before → After: WooCommerce Worker Increase
To make the improvement concrete:
- Before (2 workers): p50 TTFB 380 ms / p95 TTFB 4,100 ms / LCP on shop page 7.2 s (measured via WebPageTest from Virginia, cable profile)
- After (4 workers): p50 TTFB 380 ms / p95 TTFB 510 ms / LCP on shop page 2.8 s
The p50 did not change because the median request was already being served by an available worker. The p95 and LCP improved because the queue dissolved.
Note: LCP on a WooCommerce shop page is often TTFB-bound when the largest element is a server-rendered product image loaded in the initial HTML. Fixing TTFB fixed LCP here without any image optimization work.
How to Reduce PHP Execution Time Per Request
If your ratio is high but adding workers does not fix it (like the membership site), the problem is execution time. These are the highest-leverage changes, in order of typical impact:
1. Enable object caching with Redis or Memcached
WordPress makes multiple database calls per request by default. An in-memory object cache collapses repeated queries. On Kinsta and WP Engine, Redis is available on mid-tier plans. On Cloudways, it is a one-click add-on. Typical impact: 30–60% reduction in PHP execution time for content-heavy sites.
2. Profile with Query Monitor before guessing
Install Query Monitor (version 3.16.x as of this writing) and load the slow page while logged in. Sort the Queries panel by time. A single query taking 400 ms in a 620 ms request is your target — not your plugin count.
3. Audit autoloaded options
Run this query against your database:
SELECT SUM(LENGTH(option_value)) as autoload_size
FROM wp_options
WHERE autoload = 'yes';
If autoload_size exceeds 800 KB, you have plugins storing large serialized data in wp_options that loads on every request. Common offenders: expired transients that were not cleaned up, analytics plugins storing raw data, and form plugins caching submission counts. The WP Sweep plugin (1.1.x) or a targeted SQL DELETE clears these safely.
4. Disable unused REST API endpoints and heartbeat
The WordPress Heartbeat API fires AJAX requests every 15–60 seconds from the admin. On sites with many logged-in users (membership sites, learning management systems), this creates a steady background load of authenticated PHP requests that consume workers. Set wp_heartbeat_settings to reduce frequency or disable it on the front end via functions.php.
Recommended Settings by Site Type
| Site type | Recommended workers | Object cache | Full-page cache | Notes |
|---|---|---|---|---|
| Blog / brochure | 2 | Optional | Required | FPC eliminates most PHP execution |
| WooCommerce (< 500 orders/mo) | 2–4 | Recommended | Partial (cache non-cart pages) | Cart/checkout must bypass FPC |
| WooCommerce (> 500 orders/mo) | 4–6 | Required | Partial | Monitor p95 TTFB monthly |
| Membership / LMS | 4+ | Required | Disabled or minimal | Authenticated requests cannot be cached; execution time is the lever |
| Multisite network | 4–8 | Required | Per-subsite | Worker demand multiplies across sites |
Do This First
Before contacting your host to request more PHP workers or upgrading your plan, run the two-step measurement above. The hey concurrent load test takes under five minutes and will tell you whether you have a queue problem or an execution-time problem. They require different fixes, and paying for more workers when execution time is the bottleneck will not move your p95 TTFB.
If your p95/p50 ratio is above 3× on an uncached page, start with object caching and this guide on best VPS hardening practices to ensure your infrastructure is optimized. Re-run the load test. If the ratio is still above 3× after those changes, then the case for additional workers is justified by data.
The goal is a p95/p50 TTFB ratio below 1.5× on your slowest uncached page type. That number means your server is answering requests consistently, not occasionally — which is what Core Web Vitals field data measures across the full distribution of your real visitors, not just the fast ones.