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

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.

Update PHP extensions

patch

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

Domain name

Example: mydomain.tld
Body
enablestring[]Optional

PHP extensions to enable.

Example: ["json","yaml"]
disablestring[]Optional

PHP extensions to disable.

Example: ["imagick"]
Responses
200

Success empty response

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