CorefinityCorefinityDocs
Open the Control PanelControl Panel
PHP · 9 of 11

Update a site's PHP version

Moves the site to another PHP version, one of the versions its PHP configuration lists as allowed. A version that needs an acknowledgement, such as one past its end of life, is refused ack_required until you send it in acknowledge. Answers the operation that makes the change.

PUT/api/corestack/sites/{site}/php-version

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

acknowledgearray of strings

What the version's requires_ack asks you to acknowledge: eol (past its end of life), app_constraint (outside the range the application accepts), extensions_off (extensions the version does not have are turned off) or ini_incompatible (lines of the custom php.ini it does not accept). Up to 4 items.

eolapp_constraintextensions_offini_incompatible
applystring

When a change that needs a maintenance window is applied. now applies it at once. tonight queues it for the site's next window. window means the same as tonight. An endpoint that takes window only while maintenance windows are on for your company says so, and refuses it 422 on apply otherwise. Defaults to now.

nowtonightwindow
tostringRequired

The PHP version to move to, as major and minor. Up to 8 characters.

Returns

201 The change started (the operation), or was queued for the site's window (queued).

202 The change was sent and its outcome is still being established: the operation is pending. Follow it by its id; it settles as saved or as failed within a few minutes. Do not send the change again meanwhile. Poll the operation until it finishes.

Fields of the 201 answer
Fields of the 202 answer
committed_atstring or nullRequired
completed_atstring or nullRequired
created_atstring or nullRequired
errorstring or nullRequired
from_versionstring or nullRequired
idintegerRequired
requested_byany

Who asked for the change.

statusstringRequired

Where a change is. completed and failed are final; every other status means the change is still running and blocks another change to the same site.

pendingcommittedrolling_outexecutingcompletedfailed
status_labelstringRequired
stepsarray of objectsRequired
Fields of each item
keystring
labelstring
statestring

One of done, current, todo, failed or skipped.

to_versionstring or nullRequired
typestringRequired
type_labelstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404noneCheck the id. You see only what your account can reach.
409busyAnother operation is running on the site. Wait for it to finish.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
422ack_requiredConfirm what this change does before it starts.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/php-version \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "acknowledge": [
      "eol"
    ],
    "to": "8.1"
  }'
{
  "item_id": 5120,
  "operation": null,
  "queued": true,
  "window_date": "2026-11-09"
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT