{"id":57769,"date":"2020-10-15T14:35:10","date_gmt":"2020-10-15T19:35:10","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=57769"},"modified":"2020-10-15T14:35:10","modified_gmt":"2020-10-15T19:35:10","slug":"how-to-use-php-fpm-with-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/how-to-use-php-fpm-with-cpanel\/","title":{"rendered":"How to Use PHP-FPM with cPanel"},"content":{"rendered":"\n

PHP performance is an enduring issue for web hosts. PHP is the most widely used server programming language on the web by a big margin. The most popular content management systems and ecommerce applications are written in PHP, including WordPress\u00ae, Joomla, Drupal, Magento\u00ae, and dozens more. <\/p>\n\n\n\n

The ultra-fast PHP-FPM accelerates PHP execution on busy web servers, making it a valuable tool in the fight against slow sites and resource-constrained servers. <\/p>\n\n\n\n

This article takes a deep dive into how PHP-FPM works and explains how to deploy and configure it with cPanel & WHM. <\/p>\n\n\n\n

What is PHP-FPM?<\/strong><\/h2>\n\n\n\n

PHP-FPM is an alternative PHP implementation that makes busy web applications faster while helping system administrators to control resource consumption on their server. <\/p>\n\n\n\n

A PHP implementation, also known as the runtime, interprets and executes code.  Traditional runtimes such as Apache\u2019s mod_PHP do their work within the web server. That approach has advantages, but each connection consumes a chunk of the server\u2019s resources for as long as it lasts. If there are too many concurrent connections, the server may run out of resources like memory altogether, impacting the performance of every site it hosts. <\/p>\n\n\n\n

PHP-FPM does things differently: it operates outside of the web server and uses a pool of worker processes to execute code. The workers are ready and waiting when a request comes in, and you can control how many workers are in the pool so they can\u2019t multiply until they consume all the server\u2019s RAM and processor time. <\/p>\n\n\n\n

It works like this:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n