Introduction
There are times where you may want to enable or disable as well as adjust the PHP-FPM settings for a cPanel account, below are a few of the ways this can be done.
Procedure
You can manage your PHP installation settings for individual vhosts via the command line using the following command.
whmapi1 php_set_vhost_versions version='ea-php70' vhost='domain.to.change' php_ fpm = 1
The command above will enable PHP-fpm and set the PHP version; please note that PHP-FPM cannot be adjusted on an "inherited" PHP version, so you will need to set it.
If you want to make the change to multiple vhosts at the same time, you can include the following in place of just "vhost"
vhost= vhost-1 =domain.to.change vhost- 2 = domain.to.change2 vhost- 3 = domain.to.change3
And finally, if you need to preset some of the PHP-FPM Pool values, you can include the following at the end if enabling PHP-FPM.
php_ fpm _ pool _ parms = {"pm _ max _ children": 5,"pm _ max _ requests": 20,"pm _ process _ idle _ timeout":1 0}
Those are provided as an example and are not an exhaustive list.
For information, please refer to the following articles.
https://api.docs.cpanel.net/openapi/whm/operation/php_set_vhost_versions/
https://docs.cpanel.net/knowledge-base/php-fpm/configuration-values-of-php-fpm/
Comments
0 comments
Article is closed for comments.