Update default PHP version

The version of PHP that you wish to set as the system's default.

  • ea-php54
  • ea-php55
  • ea-php56
  • ea-php70
  • ea-php71
  • ea-php72
  • ea-php74
  • inherit
  • Any custom PHP package name.

Important:

  • We deprecated PHP 5.6 and PHP 7.0 in cPanel & WHM version 84. We will remove them in a future version. For more information, read our cPanel Deprecation Plan documentation.

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

Note:

This document only applies to systems that run EasyApache 4.

SecurityBasicAuth
Request
query Parameters
version
required
string

The version of PHP that you wish to set as the system's default.

Example: version=ea-php74
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/php_set_system_default_version
Request samples
whmapi1 --output=jsonpretty \
  php_set_system_default_version \
  version='ea-php74'
Response samples
application/json
{
  • "metadata": {
    • "command": "php_set_system_default_version",
    • "reason": "Ok",
    • "result": 1,
    • "version": 1
    }
}