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

Update PHP options

Updates PHP options for the website (e.g.

Update PHP options

patch

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: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Body
Responses
200

Success empty response

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