---
title: "Update PHP extensions"
method: PATCH
path: "/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions"
tags: ["Hosting: PHP"]
---

# Update PHP extensions

`PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/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.

## Path parameters

- `username` string, required
- `domain` string, required

## Request body

- HostingV1PhpUpdatePhpExtensionsRequest
  - `enable` string[] — PHP extensions to enable.
  - `disable` string[] — PHP extensions to disable.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

## Changes

> 88 revisions in range; 15 could not be searched.

- **2026-07-03** `7c2b8656649e` — 1 info
  - endpoint added
- **2026-06-09** `d05574986eb1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/hosting/v1/accounts/:username/websites/:domain/php/extensions/patch.md)

---

[API](https://skmtc.dev/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.dev/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/53ccee45e5eb/schema)
