Update PHP extensions
Enables or disables PHP extensions (modules) for the website. Use the Get PHP details endpoint to check the current extension states before changing them.
Enables or disables PHP extensions (modules) for the website.
Use the Get PHP details endpoint to check the current extension states before changing them.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldBody
enablestring[]OptionalExample:
PHP extensions to enable.
["json","yaml"]disablestring[]OptionalExample:
PHP extensions to disable.
["imagick"]Responses
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/extensions
PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"enable": [
"json",
"yaml"
],
"disable": [
"imagick"
]
}{
"message": "Request accepted"
}Last updated
Was this helpful?