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

# Update website PHP version

`PATCH /api/agency-hosting/v1/websites/{website_uid}/php-settings/version`

Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.

## Path parameters

- `website_uid` string, required

## Request body

- AgencyHostingV1PhpUpdateVersionRequest
  - `version` string, required — PHP version to switch the website to, as major.minor. Must be one of the versions returned by the available versions endpoint.

## 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/version/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)
