It’s the job of PHP workers to process any requests that “BYPASS” or “MISS” your website’s cache (learn more about caching here). They are responsible for generating the HTML pages that you and your visitors see when you visit your website, as well process background tasks such as WP-Cron or security plugin related work.
Once a request is completed, the PHP worker then returns the information back to the webserver.
What are PHP workers?Ī PHP worker is a PHP processor that handles requests allocated by the webserver (Nginx / OpenLitespeed) when these requests require PHP code to be processed. PHP ThreadsĪ thread is a small unit of instructions which can be executed by a processor (our server’s CPU). The worker pool is the pool of available PHP workers that are ready to take on requests from the web server (Nginx / OpenLiteSpeed). A Few Bite-Size Definitions PHP WorkerĪ PHP worker is a background computing process responsible for processing PHP code. Let’s take a look at what they are, what they’re responsible for, and how this relates to hosting your WordPress websites.
If you plan on growing a serious hosting business or even hosting a moderate to heavily-trafficked website that has dynamic content, knowing how to manage PHP workers is a valuable skill. Spot when performance issues are related to PHP workers, diagnose what’s going on, and set about fixing them.
If you’re using Apache, it may be time to consider not using Apache.
We’ll be primarily focusing on Nginx and in the future, we’ll update this article with info on OpenLiteSpeed. How to explain these to a potential client.How to begin optimizing your PHP workers for different types of websites.How to assess the hosting requirements of a website.The relationship between CPU cores, RAM, PHP workers and WordPress performance.Most managed hosting companies have rigid, container based hosting plans that can be great for your average brochure style website, but for any dynamic website with lots of cache bypassing traffic, PHP worker restrictions on these types of plans can quickly become a costly pain point.Īs you grow your own hosting business and host bigger and more complex websites, it’s important to have a fundamental understanding of what PHP workers are, and how they will affect your websites performance.
Oh, your website is slow and completely unreliable when you have a few people trying to checkout at the same time? You need more PHP workers! Upgrade to our 60 site plan, even though you only host 8 websites… That conversation usually goes something like this (minus the sarcasm): Depending on your hosting experiences in the past, you may have come across the PHP Worker Tax.