Hosting: PHP

Update PHP extensions

Changed on

Enables or disables PHP extensions (modules) for the website.

Use the Get PHP details endpoint to check the current extension states before changing them.

patch/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions

Request

  • Base URL: https://developers.hostinger.com
  • URL: https://developers.hostinger.com/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions
  • Auth: HTTP bearer

Path parameters

usernamestring required
Example:u123456789
domainstring required
Example:mydomain.tld

Domain name

Request body

enablestring[]

PHP extensions to enable.

disablestring[]

PHP extensions to disable.

Example request

{
  "enable": [
    "json",
    "yaml"
  ],
  "disable": [
    "imagick"
  ]
}

Response

Success empty response

messagestring

Example response

{
  "message": "Request accepted"
}

Changes