It was a day like any other. I sat down with my coffee, ready to tackle a few updates on my website. But something wasn’t right. My WordPress pages were crawling. Slow to load, timeouts popping up, and my cozy little blog was acting more like a dial-up website from 1998. What was going on?
TL;DR: My shared hosting provider was throttling my PHP workers because my site was using too many of them. This made everything sluggish. I fixed it by learning how PHP-FPM works and tuning the process manager settings. End result: website back to lightning-fast speeds and happy visitors!
So… What the Heck Are PHP Workers?
Good question!
Imagine you run a coffee shop. PHP workers are like your baristas. Each one can serve a request (make a coffee). More customers require more baristas. But if you don’t have enough, customers (visitors) wait. On a shared hosting plan, you only get a limited number of these imaginary baristas. The moment you reach the limit, incoming requests just… wait.
This waiting? It’s called throttling.
That’s what happened to me.
How I Discovered the Throttling
At first, I thought it was my theme. Then maybe a rogue plugin. I tried clearing caches, deactivating things, reinstalling WordPress. Nothing worked. My host’s support logs showed high CPU usage and something called “entry processes” spiking. I was hitting the ceiling of my allocated PHP workers.
Shared hosting providers limit your PHP workers to keep things fair.
If your site starts using more than your fair share—bam—you get throttled. Boom, bottleneck.
What Causes High PHP Worker Usage?
This was the second part of my detective work. Here’s what I found were the main suspects:
- Poorly-coded plugins: Some plugins load resources even when they’re not needed.
- Excessive background tasks: Cron jobs or wp-admin AJAX calls can hog the workers.
- Too many uncached pages: Without page caching, every visit spins up PHP execution.
- Visitors spike: More visitors = more baristas needed = potential traffic jam!
Step 1: Getting to Know PHP-FPM
My host used PHP-FPM (FastCGI Process Manager). It’s a way to manage how PHP workers are handled behind the scenes. Thankfully, some shared hosting plans allow you to tweak these settings via a simple configuration panel. Mine did!
Three key settings you need to know:
- pm: Determines the process management strategy (static, dynamic, or ondemand).
- pm.max_children: Max number of PHP workers at one time.
- pm.start_servers, pm.min_spare_servers, pm.max_spare_servers: These affect how it scales dynamically.
I had no idea before, but I ended up diving deep into php-fpm.conf. It felt like popping the hood of a car and recognizing nothing—until something clicked.
Here’s How PHP-FPM Modes Work
- static: A fixed number of workers always running. No surprises, but can be wasteful.
- dynamic: It starts a few, and adds/removes workers as needed.
- ondemand: No workers running until requested. Best for low-traffic, but slow to respond on first load.
My site’s config was set to dynamic. Sounds good, right? Turns out, the initial settings were terrible for my traffic pattern.
Step 2: Process Manager Tuning
Here’s what I changed:
- pm: Kept it as dynamic.
- pm.max_children: Bumped it up from 5 to 10. This increased my available PHP workers.
- pm.start_servers: Increased from 2 to 5 for a faster startup.
- pm.min_spare_servers: Set to 2.
- pm.max_spare_servers: Set to 5.
These changes allowed more simultaneous PHP processes to handle requests during peak times.
Warning: You can’t just crank up all the numbers. You need to stay within your host’s resource limits. Otherwise, you’ll get suspended!
The Real MVP: Caching
While PHP-FPM tuning helped a lot, nothing beat caching.
I installed a full-page caching plugin: LiteSpeed Cache. Since my host used LiteSpeed servers, performance skyrocketed. Instead of every visit waking up a PHP worker, many requests were served instantly from the cache.
It was like hiring a robot barista that could handle a thousand customers at once.
Other caching plugins I tried:
- WP Super Cache
- W3 Total Cache
- WP Rocket (premium, but excellent)
More Tips to Reduce PHP Worker Usage
If you’re hitting your limits on shared hosting, here are some things that helped me:
- Disable heartbeat API in wp-admin with a plugin like Heartbeat Control.
- Delay cron jobs or offload them using a real cron system instead of WordPress’s default.
- Remove bloated plugins. If it’s not essential, nuke it.
- Lazy load images to reduce load times and server work.
The Final Result
Before tuning, my site loaded like a tired sloth. Every extra visitor pushed it closer to meltdown. After tuning PHP-FPM and setting up proper caching, it sailed along smoothly—even during traffic bursts!
I stopped seeing those dreaded 503 errors. No more timeouts in wp-admin. Visitors stopped leaving after 5 seconds. And yes, I could finally enjoy that cup of coffee, worry-free.
In Summary
Website slow? Check if your host is throttling your PHP workers. It might not be you—it might be your settings.
Here’s what I’d recommend:
- Understand how many PHP workers your hosting plan provides.
- Optimize your PHP-FPM settings based on your real-world traffic.
- Use caching aggressively—it’s your best friend!
And remember: Shared hosting is like living in an apartment building. If you throw a giant party and use all the hot water, your neighbors (and your website) will suffer. Be a good neighbor. Tune your server environment wisely.
Fast sites make happy users—and happy site owners!