title: PHP FastCGI Process Manager - PHP-FPM
created at: Mon Oct 28 2024 05:51:41 GMT+0000 (Coordinated Universal Time)
updated at: Sat Feb 08 2025 14:22:44 GMT+0000 (Coordinated Universal Time)
---
# PHP FastCGI Process Manager - PHP-FPM
# Overview
!! Warning
!! We **strongly** recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.
PHP FastCGI Process Manager (PHP-FPM) is an alternative FastCGI daemon for PHP that allows a website to handle high loads. PHP-FPM maintains pools (workers that can respond to PHP requests) to accomplish this. PHP-FPM is faster than traditional CGI-based methods, such as SUPHP, for multi-user PHP environments. It does **not** overload a system’s memory with PHP from Apache processes.
* LiteSpeed Web Server uses the `lsphp` binary. LiteSpeed Web Server does **not** use the system’s PHP-FPM implementation in WHM’s [*MultiPHP Manager*](https://docs.cpanel.net/whm/software/multiphp-manager-for-whm/) interface *(WHM » Home » Software » MultiPHP Manager)*.
* To monitor applications that use PHP-FPM, select the *Monitor* checkbox for the *PHP-FPM service for cPanel Daemons* service in WHM’s [*Service Manager*](https://docs.cpanel.net/whm/service-configuration/service-manager/) interface *(WHM » Home » Service Configuration » Service Manager)*.
# Running PHP-FPM with EasyApache 4
On [supported operating systems](https://docs.cpanel.net/knowledge-base/third-party/third-party-software-end-of-life-policy/#how-long-will-cpanel-support-my-chosen-operating-system) , EasyApache 4 uses the `PrivateTmp` option with PHP-FPM. EasyApache 4 does this to increase security for temporary files that the running processes in PHP-FPM access. The `PrivateTmp` option creates special directories in the `/tmp` directory for each Apache PHP-FPM version your system uses. It’s possible that each time you or the system restarts the PHP-FPM service, the `PrivateTmp` option will create a new directory.
!! Warning
!! Removing the `PrivateTmp`-created directories, either manually or automatically, will cause errors in applications or websites that use PHP-FPM. We **strongly** encourage that you do **not** remove these directories. If you need to remove any of these directories, we recommend that you restart the Apache PHP-FPM service. This ensures that Apache PHP-FPM will work correctly.
!! To restart Apache PHP-FPM, use the following command:
!! `/usr/local/cpanel/scripts/restartsrv_apache_php_fpm --hard`
# Tutorials on how to use PHP-FPM
* [Configuration Values of PHP-FPM](https://docs.cpanel.net/knowledge-base/php-fpm/configuration-values-of-php-fpm/) — This document lists the cPanel PHP-FPM system’s configuration settings and their default values.
* [PHP-FPM Code and FileSystem Layout for EasyApache4](https://docs.cpanel.net/knowledge-base/php-fpm/php-fpm-code-and-filesystem-layout-for-easyapache-4/) — This document explains how to implement PHP-FPM, the filesystem layout of PHP-FPM, and how to adjust PHP versions.
* [The `php_fpm_config` Script](https://docs.cpanel.net/whm/scripts/the-php_fpm_config-script/) — This document explains when and how to use the `/scripts/php_fpm_config` script.
* [PHP-FPM Domain Pools](https://docs.cpanel.net/knowledge-base/php-fpm/php-fpm-domain-pools/) – This document explains how to create a domain pool with PHP-FPM.