Child pages
  • MultiPHP Manager for WHM
For cPanel & WHM version 74

Skip to end of metadata
Go to start of metadata

(WHM >> Home >> Software >> MultiPHP Manager)

Important:

This interface only appears on systems that run EasyApache 4.

Overview

WHM's MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager) allows you to easily manage the PHP and PHP-FPM configurations of your cPanel accounts. In this interface, you can manage the PHP version, PHP-FPM setting, or pool option of any virtual host that you own. 

MultiPHP Manager

Select a tab to view more information about that section of the MultiPHP Manager interface.

PHP Version

The PHP version tab allows you to select the system's PHP version, the version of PHP for each domain, and to manage PHP-FPM on each domain.

System PHP version

The System PHP Version refers to the version of PHP that functions as the global default for all accounts. Only the system administrator can set the System PHP version. When you create a new account, the account uses this version of PHP by default. Also, any primary domain that you set to Inherit will use the System PHP Version. For more information, read our PHP Inheritance documentation. 

To change the system default PHP, perform the following steps:

  1. Click Edit in the System PHP Version section.
  2. Select your desired PHP version from the menu.
  3. Click Apply

Remember:

If you change the system default PHP version, the PHP version of any primary domain that you set to Inherit also changes.

Notes:

  • To remove the CloudLinux™ promotions, log into your Manage2 account, navigate to the Update Company Information section, and select the Disabled button next to the Purchase CloudLinux Url or email address option. You can only disable this option if you possess a Partner account.
  • When you change the system default PHP version, the interface writes to the /etc/cpanel/ea4/php.conf file. The system logs any changes made to this file to the /etc/cpanel/ea4/php.conf.bak/TIME.PID file, where TIME represents the time the system made the change and PID represents the process PID. The system only keeps the 20 most recent php.conf file changes.

The domains table

In EasyApache 4, each domain or virtual host can use any currently-installed PHP version or currently-installed PHP-FPM setting. 

The domains table displays the following information:

  • Domain — The domain's name.
  • Account — The domain's account name.
  • Account Owner — The account's owner's name.
  • PHP Version — The PHP version that the domain currently uses, and whether the account inherited that setting.
  • PHP-FPM — The domain's PHP-FPM status.

Note:

The system does not list aliases (parked domains) in the domains table.

Set a domain's PHP version

To change an domain's PHP version, perform the following steps:

  1. Select the checkbox next to the domain that you wish to change.
  2. Select the desired version of PHP in the PHP Version menu. If you want the account to always use the parent domain's PHP version, select Inherit. An account that you set to Inherit with no parent domain uses the system default.
  3. Click Apply. The system changes the selected domain's PHP version.

    Notes:

    • If you enabled PHP version restrictions on an account, all installed PHP versions still appear in this interface. For more information, read our How to Restrict a User's PHP Versions documentation.

    • If you enabled PHP-FPM on a domain and you change the domain's PHP version, the system will change the domain's PHP-FPM version to match the selected PHP version. If PHP-FPM is not enabled on your domain, the system changes the PHP and PHP-FPM versions separately.

Warning:

Incorrect ownership of an .htaccess file may cause failures when you change an account's PHP version. The cPanel user account must own the .htaccess file that you want to change, and that file must use 644 permissions.

Set a domain's PHP-FPM setting

PHP FastCGI Process Manager (PHP-FPM) provides an alternative PHP module that allows a website to handle strenuous loads on sites. PHP-FPM maintains pools (workers available to respond to PHP requests) to accomplish this. These pools of workers allow the website to handle more requests than it normally could.


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.

To set the PHP-FPM setting for a domain, perform the following steps:

Step one: Install the required PHP-FPM packages

The system may display the following message:

This message indicates that your system does not contain one or more of the required PHP-FPM packages. Perform the following steps to install the required PHP-FPM packages:

  1. Click Install. A new window will appear.
  2. Click Provision.

For more information about the EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4), read our EasyApache 4 Interface documentation.

Step two: Set the domain's PHP-FPM setting

To enable or disable an account's PHP-FPM setting, perform the following steps:

  1. Select the checkbox next to the domain that you wish to change.
  2. Select On to activate PHP-FPM or Off to deactivate it.

    Important:

    If you select a domain with the PHP version set to Inherit, the system will not allow you to set PHP-FPM for that domain. You must either select a PHP version other than Inherit or not use PHP-FPM.

  3. Click Apply.

Notes:

  • When you transfer domains between servers, the destination server will not inherit the source server's PHP-FPM setting. For more information on how to correct this, read our PHP-FPM documentation.
  • If you enable PHP-FPM on an account's primary domain and then change that domain's name, the system will disable PHP-FPM for that new domain. You must re-enable PHP-FPM on the new domain if you wish to use PHP-FPM for the new domain.

Set a domain's pool options

The Pool Options feature allows you to set automated pools (workers) for your server.

Note:

Apache limits the performance of PHP-FPM pool options. Apache's configuration settings for pool options must match the PHP-FPM service's configuration settings. For more information, read our Apache vs PHP-FPM Bottleneck with Child Processes documentation.

To set a domain's pool options, perform the following steps:

  1. Click Pool Options for the desired domain that you wish to change. The system will display the following options:

    Pool OptionsDefaultLimit
    Max Children51-10,000
    Process Idle Timeout101-10,000,000
    Max Requests201-10,000,000
  2. Enter your desired options for Max ChildrenProcess Idle Timeout, and Max Requests.

  3. Click Save. The system will display a success message.


System PHP-FPM

Administrators can enable or disable PHP-FPM for all accounts. 

Enable System PHP-FPM Status

To enable System PHP-FPM Status, perform the following steps:

  1. In the System PHP-FPM section, click Turn On next to System PHP-FPM Status. The system will display the Convert All Accounts to PHP-FPM button.

  2. To convert all your accounts to PHP-FPM, click Convert All Accounts to PHP-FPM. The system will display a message that it has started the conversion process. 

    Notes:

    • If your PHP version does not match the required PHP-FPM installed packages, the system will not allow you to convert all of your accounts to PHP-FPM.
    • You cannot convert all of your accounts to PHP-FPM until you install the appropriate PHP-FPM packages for the specified PHP version.
    • You can enable or disable PHP-FPM for all accounts.
    • When enabled, the system automatically enables PHP-FPM for new accounts, domains, subdomains, and addon domains that you create.

  3. If you wish to see the conversion log, click the link provided in the success message above System PHP-FPM Status. Your status will now display as On and all of your accounts, domains, subdomains, and addon domains will run with PHP-FPM enabled.

Disable System PHP-FPM Status

To disable System PHP-FPM Status, click Turn Off next to System PHP-FPM Status in the System PHP-FPM section. Your status will now display as Off and all of your accounts will no longer run with PHP-FPM enabled.

PHP Handlers

Note:

PHP handlers does not apply to PHP-FPM.

In EasyApache 4, each PHP version can use its own PHP handler. The PHP Handlers tab allows you to select the PHP handler that each version of PHP uses.

The list of PHP versions shows:

  • An installed PHP version
  • The PHP handler that the PHP version uses

To change the handler that a PHP version uses, perform the following steps:

  1. Click Edit next to the version of PHP whose handler you wish to change.
  2. Select the PHP handler from the menu.

    Notes:

    • The menu only shows the PHP handlers that are compatible with your selected version of PHP.

    • You can only use the DSO handler with one version of PHP.

  3. Click Apply.

    Note:

    When you change a PHP version's handler, the interface writes to the /etc/cpanel/ea4/php.conf file. The system logs any changes made to this file to the /etc/cpanel/ea4/php.conf.bak/TIME.PID file, where TIME represents the time the system made the change and PID represents the process PID. The system only keeps the 20 most recent php.conf file changes.