Update PHP version
Changes the PHP version of the website. Use the Get PHP details endpoint to see the versions available for the website.
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:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldBody
versionstringRequiredExample:
PHP version to switch the website to.
8.1Responses
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/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?