Introduction
PHP FPM is a performant method of serving PHP content. Although, a common issue that users encounter with FPM on a busy server is that it requires tuning in order to avoid downtime.
We have a guide that outlines how to tune FPM:
PHP FPM Performance Tuning Basics
If you're not interested in tuning FPM to keep up with higher demands on your server, a very good alternative is the LSAPI handler. cPanel provides the LSAPI handler which makes use of the PHP LiteSpeed SAPI.
Our version of the LSAPI handler does not require the use of LiteSpeed. cPanel's LSAPI is able to offer a solution that is comparable to PHP FPM in terms of performance but requires less tuning than PHP FPM. Use the below procedure to learn how to switch from PHP FPM to the LSAPI handler on your cPanel server.
Procedure
- Login to WHM as the root user
- Navigate to:"Home / Software / EasyApache 4"
- Click on the blue "Customize" button
- Click on the "Apache Modules" tab on the left
- Search for "lsapi"
- Toggle it for installation
- Search for "mod_suexec"
- Toggle it for installation
- Click on the "Review" tab on the left sidebar
- Click on the "Provision" button
- Navigate to: "Home / Software / MultiPHP Manager"
- Toggle the "PHP-FPM" setting to disabled. This setting has the following description
"System PHP-FPM setting applies to only new account creations." - Under the "PHP Handlers" section, select "lsapi" from the drop-down for each desired version
- Click on the "User Domain Settings" tab
- Toggle "PHP-FPM" to disabled for all domains