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

# Update PHP version

`PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/php/version`

Changes the PHP version of the website.

Use the Get PHP details endpoint to see the versions available for the website.

## Path parameters

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

## Request body

- HostingV1PhpUpdatePhpVersionRequest
  - `version` string, required — PHP version to switch the website to.

## 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; 78 could not be searched.

- **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/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)
