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

Update PHP version

Changes the PHP version of the website. Use the Get PHP details endpoint to see the versions available for the website.

Update PHP version

patch

Changes the PHP version of the website.

Use the Get PHP details endpoint to see the versions available for the website.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Body
versionstringRequired

PHP version to switch the website to.

Example: 8.1
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
patch/api/hosting/v1/accounts/{username}/websites/{domain}/php/version
PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/php/version HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "version": "8.1"
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?