For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update website PHP version

Switches an Agency Plan website to a different PHP version.

Update website PHP version

patch

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_uidstringRequired

Agency Plan website UID

Example: zpwlGlp19
Body
versionstringRequired

PHP version to switch the website to, as major.minor. Must be one of the versions returned by the available versions endpoint.

Example: 8.2
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
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?