hosting

POST /v1/sites/{siteId}/upgrade-to-php

Upgrade a static HTML site to PHP hosting, in place.

All hosting endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the hosting.php.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/upgrade-to-php \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

A static HTML site becomes a PHP site IN PLACE, with no downtime (owner brief, queue Q111). On our servers every site's web server already runs PHP, so nothing is copied, re-placed or re-pointed: the site's stack becomes php, its PHP version the plan's default (or php_version, when the plan offers it) and the PHP tuning follows in the next maintenance pass. 422 with details[].code SITE_NOT_STATIC (already PHP, WordPress or another stack), SITE_NOT_ACTIVE (still setting up), STATIC_ON_EDGE_HOST (published to an edge host that cannot run PHP: move it onto our servers first) or PHP_VERSION_NOT_OFFERED. Audited as hosting.site.upgrade_to_php. An out-of-scope or unknown id is a 404. Requires hosting.php.manage.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
php_versionstringNoA PHP version the site's plan offers; omitted = the plan's default.

Response

NameTypeRequiredWhat it is
site_idstringYes—
stack_typestringYes—
runtimestringYes—
php_versionstringYes—

Errors this endpoint can return

401 · 403 · 404 · 422