Update PHP options
Updates PHP options for the website (e.g.
Updates PHP options for the website (e.g. memory_limit, max_execution_time, upload_max_filesize).
Only provide the options you want to change, inside the options object.
Values above the account plan limit are silently capped to that limit, so the request can succeed with a smaller applied value. Call the Get PHP details endpoint afterwards to read the applied value.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldBody
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/options
PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/php/options HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 89
{
"options": {
"memory_limit": "512M",
"max_execution_time": 300,
"upload_max_filesize": "256M"
}
}{
"message": "Request accepted"
}Last updated
Was this helpful?