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

For cPanel & WHM version 64


This document only applies to systems that run EasyApache 4.  


The /usr/local/cpanel/bin/rebuild_phpconf script manages your server's default PHP version and PHP handlers in EasyApache 4. You can use this script to set your system default PHP version or change the PHP handler for a PHP version. You can also make these changes in WHM's MultiPHP Manager interface (Home >> Software >> MultiPHP Manager). 

The /bin/rebuild_phpconf script

To use the /bin/rebuild_phpconf script, run the following script:

/usr/local/cpanel/bin/rebuild_phpconf [arguments]


The /usr/local/cpanel/bin/rebuild_phpconf script accepts the following arguments:


Set the default version of PHP that Apache uses.

In this argument, version represents the name of the PHP package that you wish to set as the default PHP version.

/usr/local/cpanel/bin/rebuild_phpconf --default=ea-php55

Set the PHP handler that the specified PHP version uses.

In this argument, version represents the name of the PHP package that you wish to set the PHP handler for, and handler represents the name of the PHP handler that you wish to use.

/usr/local/cpanel/bin/rebuild_phpconf --ea-php54=suphp
--currentDisplay the current PHP handler settings./usr/local/cpanel/bin/rebuild_phpconf --current
--availableDisplay the available handlers and PHP versions./usr/local/cpanel/bin/rebuild_phpconf --available
--helpDisplay a help message./usr/local/cpanel/bin/rebuild_phpconf --help
--dryrunDisplay the changes that a set of arguments would make to Apache./usr/local/cpanel/bin/rebuild_phpconf --dryrun
--no-restartDo not restart Apache after you make changes./usr/local/cpanel/bin/rebuild_phpconf --no-restart
--errorsPrint errors to STDERR as well as the log file./usr/local/cpanel/bin/rebuild_phpconf --errors
--no-usersDo not update user settings when you update a PHP version's handler./usr/local/cpanel/bin/rebuild_phpconf --no-users


The following example sets the default PHP version to PHP 5.6 and the PHP handler to cgi:

/usr/local/cpanel/bin/rebuild_phpconf --default=ea-php56 --ea-php56=cgi

The following example displays the requested changes, but does not apply them:

/usr/local/cpanel/bin/rebuild_phpconf --dryrun --ea-php56=cgi --ea-php55=suphp

Additional documentation