WPX
Return PHP compatibility
Changed onThis function reports whether the PHP version a WordPress installation would run under meets the minimum that WordPress requires.
Note:
- Two PHP versions must pass: the server's system default PHP, which WordPress Toolkit uses while it stages the installation outside the document root, and the domain's own PHP, which serves the site afterwards.
- A cPanel user can change a domain's PHP version in MultiPHP Manager, but only the hosting provider can change the system default.
- The create_website, create_nova_for_wordpress_website, and import_website functions run the same check. When it fails, they return the status field set to unsupported_php with this function's data.
get/WPX/get_php_compatibility
Request
- Base URLhttps://cpanel-server.tld:2083/execute
- AuthHTTP basic
Query parameters
domainstring
The domain to evaluate. The system normalizes the value to lowercase.
- When present, the system checks the domain's own PHP version in addition to the system default. The domain must belong to the account, or the function returns an error.
- When absent or empty, or when the account has no virtual host for the domain yet, the system only evaluates the system default.
Response
The HTTP request was successful.
Example response
{
"apiversion": 3,
"func": "get_php_compatibility",
"module": "WPX",
"result": {
"data": {
"blocked_by": [
"system_default"
],
"domain": "example.com",
"domain_package": "ea-php73",
"domain_version": "7.3",
"domain_version_source": "domain",
"domain_version_vhost": "example.com",
"effective_version": "7.3",
"required_version": "7.4",
"system_default_package": "ea-php73",
"system_default_version": "7.3"
},
"metadata": {
"transformed": 1
},
"status": 1
}
}Changes
- info
endpoint added
- info