---
title: "Replace website PHP options"
method: PUT
path: "/api/agency-hosting/v1/websites/{website_uid}/php-settings/options"
tags: ["Agency Hosting: PHP"]
---

# Replace website PHP options

`PUT /api/agency-hosting/v1/websites/{website_uid}/php-settings/options`

Replaces the custom php.ini values on an Agency Plan website with the ones provided. Any option not in the request is reset to its default, so call the options endpoint first and send the full desired set. Sending an empty array resets every option to its default.

## Path parameters

- `website_uid` string, required

## Request body

- AgencyHostingV1PhpUpdateOptionsRequest
  - `options` object[], required — Option names and values. Each name must be one of the options returned by the options endpoint, and each value must satisfy that option's allowed_values when it declares them.
    - `name` string, required — php.ini directive name.
    - `value` string, required — Value to apply.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

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

## Changes

- **2026-08-17** `8b0328d323ca` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/agency-hosting/v1/websites/:website_uid/php-settings/options/put.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)
