Skip to content

Update WordPress on a site

POST /api/v2/shared-hosting/{accountId}/wordpress/{siteId}/actions/upgrade

Updates WordPress on one site to the newest version the installer offers. The update runs before the response returns. upgradedTo is the new version. It is null when the installer did not report one. A failed update returns 502 upstream_failed.

The web hosting account must be active and on cPanel.

Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).
siteIdstringrequired
The WordPress site ID (wp_…).

Example

POST /api/v2/shared-hosting/{accountId}/wordpress/{siteId}/actions/upgrade
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/wp_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/upgrade" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json"

Responses

200 WordPress was updated.

Response 200
{
"id": "wp_01hxa3b4c5d6e7f8g9h0j1k2m3",
"upgraded": true,
"upgradedTo": "6.5.5"
}
Response fields
idstring
The WordPress site ID (wp_…).
upgradedboolean
Always true on a 200 response.
upgradedTostring or null
The WordPress version after the update, or null when it was not reported.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is wp_installation_not_found.
409Conflict. code is account_suspended, account_not_eligible_cpanel, or a route-specific blocker with its own recovery fields.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.