Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 68


The /usr/local/cpanel/scripts/php_fpm_config script installs configuration files when you manually edit the PHP-FPM configuration files. This script also helps to troubleshoot problems in the PHP-FPM system.



The /usr/local/cpanel/scripts/php_fpm_config script

To use this script, run the following command as the root user:

/usr/local/cpanel/scripts/php_fpm_config --rebuild [--domain=domain] --check [--json]


--rebuild [--domain=domain]

The --rebuild command rebuilds all FPM configuration files and Apache vhost entries according to the values in the user's domain  php-fpm.yaml  files.

When you add the --domain=domain argument, the system restricts the --rebuild operation to only a single domain.



/usr/local/cpanel/scripts/php_fpm_config --rebuild --domain=domain

--check [--json]

The --check command scans all configuration and .yaml files for any inconsistencies and then outputs an inventory of all known cPanel FPM configurations and statuses. It will also output any errors.  

It may also indicate that the  .conf  file in the  php.fpm.d  directory is older than than the  .yaml  file. If the system indicates this, perform the  --rebuild  command.



/usr/local/cpanel/scripts/php_fpm_config --check --json

 The --convert_all command identifies all domains on a system and enables PHP-FPM on them. This script turns on PHP-FPM for all accounts.

If your domain's PHP is set to Inherit, the system converts it to the default PHP handler for the system. Then the system enables PHP-FPM for the specified account or accounts.


Your server may run out of memory if you enable PHP-FPM on all domains and accounts. Make certain that your server possesses enough memory to continue, or you may experience severe data loss.

/usr/local/cpanel/scripts/php_fpm_config --convert_all



Additional documentation