MCP tool · Hosting account
set_php_version
Change the PHP version, then confirm it by reading the version back — it never reports success on an unconfirmed write.
set_php_version
Idempotent
Description
Change the PHP version, then confirm it by reading the version back — it never reports success on an unconfirmed write. On a CloudLinux node the change goes through the CloudLinux PHP Selector and applies to the whole hosting account (scope: account in the response); elsewhere it is per-domain. Changing PHP can break a site written for an older version, so pick a version the application supports. This does not touch php.ini (use set_php_settings) or extensions (use manage_php_extensions).
Input
| Name | Type | Description |
|---|---|---|
input
required
|
string |
A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
|
version
required
|
string |
The PHP version to switch to, e.g. 8.3.
|