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
accountIdstringrequiredThe web hosting account ID (
acct_…).siteIdstringrequiredThe WordPress site ID (
wp_…).Example
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.
{ "id": "wp_01hxa3b4c5d6e7f8g9h0j1k2m3", "upgraded": true, "upgradedTo": "6.5.5"}Response fields
idstringThe WordPress site ID (
wp_…).upgradedbooleanAlways
true on a 200 response.upgradedTostring or nullThe 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.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is wp_installation_not_found. |
| 409 | Conflict. code is account_suspended, account_not_eligible_cpanel, or a route-specific blocker with its own recovery fields. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |