PHP Workers vs Full Edge Caching: Fixing "Laggy WordPress" Without Guesswork
WordPress sites experiencing slow performance often face a diagnostic question: do you need more PHP workers to handle concurrent requests, or do you need edge caching to reduce requests hitting PHP entirely? The answer isn't always obvious, but measuring the right metrics reveals what's actually broken. Guessing wastes time and money on solutions that don't address your specific bottleneck.
Understanding the difference
PHP workers are processes that execute your WordPress code. Each incoming request requires a PHP worker. When all workers are busy, new requests queue until one becomes available. More workers means handling more simultaneous requests, but each still executes the full WordPress stack: plugins, themes, database queries.
Edge caching serves responses from cache without executing PHP. When a visitor requests a cached page, your hosting doesn't run WordPress at all—the CDN serves HTML from memory. This reduces PHP worker load dramatically because most requests never reach your server.
These solve different problems. PHP workers address concurrency—handling many simultaneous requests. Edge caching addresses load—reducing total requests hitting PHP. Sometimes you need one, sometimes the other, sometimes both. Identifying your actual bottleneck determines the right solution.
Diagnosing PHP worker exhaustion
Check PHP worker availability in your hosting dashboard. Most quality hosting shows worker usage. If workers regularly hit 100% capacity, that's your constraint. Requests queue while waiting for available workers, causing delays visitors experience as site slowness.
Common symptoms include intermittent slowness—some requests fast, others very slow—rather than consistently slow responses. When workers are available, responses are quick. When all busy, new requests wait. This creates variable response times that correlate with traffic patterns.
Error logs might show "max_children reached" warnings. This directly indicates PHP worker exhaustion. Your server literally can't handle more simultaneous requests with current worker allocation. Increasing workers or reducing request volume through caching are your options.
Traffic spikes exacerbate worker exhaustion. Normal traffic might handle fine with 4 workers, but traffic doubling overwhelms capacity. If performance degrades specifically during traffic increases, worker capacity is likely limiting.
Diagnosing slow PHP execution
Even with available workers, individual requests might be slow. This indicates execution time problems, not concurrency problems. Adding workers won't help—each request still takes too long. You need to reduce what each request does.
Measure actual PHP execution time with a performance monitoring plugin or APM tool. If requests consistently take 2-3 seconds of PHP execution, that's your bottleneck. Available workers doesn't matter if each request is inherently slow.
Common causes include excessive database queries, unoptimized plugins, missing indexes, external API calls, or complex computations. Use query monitoring tools to identify slow database operations. Profile plugin performance to find resource hogs.
Slow execution amplifies worker exhaustion. If each request takes 3 seconds and you have 4 workers, you handle only 80 requests per minute maximum. If you reduce execution time to 300ms, those same 4 workers handle 800 requests per minute. Faster execution increases effective capacity significantly.
When adding PHP workers helps
If worker utilization regularly hits capacity but individual requests execute quickly (under 500ms), adding workers likely helps. You're not slow because of what WordPress does; you're slow because you can't handle enough requests simultaneously.
Traffic patterns with high concurrency benefit from more workers. If you receive many simultaneous visitors rather than steady traffic, worker capacity matters more. News sites, event-driven traffic, or viral content create concurrency spikes needing worker capacity.
Uncached dynamic pages require PHP execution for every request. Admin areas, user dashboards, search results, or heavily personalized content can't cache effectively. These pages need sufficient PHP capacity because every view executes WordPress.
Cost-effectiveness matters. Hosting plans offering more workers for marginal cost increase might be worthwhile even if edge caching could theoretically reduce need. Sometimes increasing capacity is simpler than implementing sophisticated caching.
When edge caching solves the problem
If most traffic hits cacheable content—blog posts, pages, archives—edge caching dramatically reduces PHP worker usage. Why execute PHP for content that doesn't change between requests? Serve from cache instead.
Cache hit rates of 80-90% are achievable for content sites. This means 80-90% of requests never touch PHP. Four PHP workers suddenly handle traffic that would have required twenty or thirty workers without caching. This scales more cost-effectively than adding workers.
Geographically distributed audiences see latency benefits beyond reduced PHP load. Edge caching serves content from locations near visitors. Even if your PHP execution is fast, network latency to your origin server adds time. Edge caching eliminates this completely for cached content.
Traffic growth becomes sustainable. As traffic increases, cached content scales at the CDN without increasing origin load. Your hosting handles the same amount of work regardless of whether you have 1,000 or 10,000 daily visitors—if most requests hit cache.
Solving slow execution requires different approaches
If PHP execution itself is slow, neither more workers nor edge caching fully solves the problem. More workers let you handle more slow requests, but requests remain slow. Caching reduces how often you execute slow code, but admin areas and logged-in users still experience slowness.
You must optimize what WordPress actually does. Identify and fix slow database queries. Remove or replace poorly performing plugins. Implement object caching (Redis/Memcached) to reduce database hits. Optimize images and assets. Profile and improve theme code.
Sometimes you discover one plugin causing most slowness. Deactivating it or finding an alternative improves execution time dramatically. Use plugin profiling tools to measure time each plugin adds. Don't guess—measure.
Database optimization often yields significant improvements. Add missing indexes to frequently queried columns. Clean unnecessary data from growing tables. Optimize database configuration for WordPress workload. These changes speed every request.
Combining solutions strategically
Most WordPress sites benefit from multiple optimizations working together. Edge caching handles anonymous traffic, PHP workers scale concurrent logged-in users, execution optimization makes everything faster. They're complementary, not alternatives.
Start by identifying your primary bottleneck through actual measurement, not assumptions. If workers are constantly maxed, capacity is your immediate problem. If execution time is high, code optimization matters most. If cache hit rates are low, caching configuration needs attention.
Fix the worst bottleneck first. Addressing secondary issues before the primary constraint wastes effort. If execution time is 5 seconds per request, adding workers or implementing caching doesn't solve fundamental slowness for users who hit PHP.
For detailed analysis comparing how Cloudflare vs PHP workers impact WordPress performance under different load patterns, including specific scenarios where each approach makes more sense, comprehensive resources dive deeper into these tradeoffs with real-world metrics.
Measuring success correctly
Track multiple metrics to understand true performance: Time to First Byte (TTFB), full page load time, PHP execution time, worker utilization, cache hit rate, and database query time. No single metric tells the complete story.
Before making changes, establish baselines. Record current performance across these metrics. After changes, measure again. Did you actually improve what mattered? Sometimes "optimization" doesn't help the metrics users experience.
Monitor real user metrics, not just synthetic tests. Real visitors using your actual site reveal performance in production conditions. Synthetic tests from high-speed connections in nearby regions don't capture what mobile users on slow connections experience.
Cache hit rate is critical if you've implemented caching. A 50% cache hit rate means half your traffic still hits PHP—benefits are limited. Optimize cache configuration to improve hit rates before declaring caching ineffective.
The troubleshooting framework
Start with measurement. Look at worker utilization, PHP execution time, cache hit rates, and database query counts. Identify which metric is worst—that's probably your primary bottleneck.
If workers are maxed: either add workers (if execution is fast) or implement/improve edge caching (if content is cacheable). Calculate which approach costs less for your traffic patterns.
If execution is slow: profile WordPress execution to find slow components. Optimize database queries, remove slow plugins, implement object caching. Address the code, not just capacity.
If cache hit rates are low: examine what's preventing caching. Excessive cache variations? Short TTLs? Logged-in traffic? Fix cache configuration to serve more traffic from cache.
After addressing primary bottleneck, re-measure. The next bottleneck often becomes apparent only after fixing the first. This iterative process methodically improves performance by addressing actual constraints in priority order.
Common mistakes to avoid
Don't add workers without measuring whether worker capacity is actually constraining performance. More workers cost money but might not improve speed if something else is the bottleneck.
Don't implement edge caching without monitoring what actually caches. Poor cache configuration might deliver minimal benefits while adding operational complexity.
Don't ignore fundamental execution slowness. Throwing capacity or caching at inherently slow code doesn't fix user experience for anyone hitting non-cached pages.
Don't optimize prematurely. If your current setup handles traffic fine, don't fix what isn't broken. Optimization effort should address actual problems, not theoretical ones.
The pragmatic approach
Most WordPress performance problems come from one of three causes: insufficient worker capacity for concurrency, slow PHP execution, or lack of effective caching. Identifying which affects your site determines the solution.
Measure before spending time or money on optimization. Real data reveals actual bottlenecks. Guessing based on general advice often addresses wrong problems.
Start with lowest-effort solutions that address measured problems. If adding workers for $10/month solves immediate pain, do that while planning longer-term optimization. If implementing edge caching is straightforward and traffic is cacheable, that might solve it completely.
Performance optimization is ongoing, not one-time. As traffic grows and site functionality evolves, new bottlenecks appear. Continuous monitoring and iterative improvement maintain good performance as circumstances change.