latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

PHP-FPM

Update PHP-FPM directives and pool options

This function configures the PHP INI directives and pool options for a system's or domain's PHP-FPM configuration.

Important:

When you disable the Web Server role, the system disables this function.

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.

post/php_fpm_config_set

Request body

domainstring

A blank value or domain name whose PHP-FPM configuration you wish to set.

validate_onlyboolean

Whether the function request is for validation or to update the settings.

  • true - Only validate the configuration.
  • false - Validate and update the configuration.

Example request

{
  "config": [
    {
      "base_flag_name": "error_reporting",
      "trinary_admin_value": 1,
      "value": "E_ALL & ~E_NOTICE"
    },
    {
      "base_flag_name": "pm_max_children",
      "trinary_admin_value": 0,
      "value": "10"
    }
  ]
}

Response

HTTP Request was successful.

Example response

{
  "metadata": {
    "command": "php_fpm_config_set",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}