Update website PHP version
Switches an Agency Plan website to a different PHP version.
Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
website_uidstringRequiredExample:
Agency Plan website UID
zpwlGlp19Body
versionstringRequiredExample:
PHP version to switch the website to, as major.minor. Must be one of the versions returned by the available versions endpoint.
8.2Responses
200
Success empty response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
patch/api/agency-hosting/v1/websites/{website_uid}/php-settings/version
PATCH /api/agency-hosting/v1/websites/{website_uid}/php-settings/version HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"version": "8.2"
}{
"message": "Request accepted"
}Last updated
Was this helpful?