---
title: "corestack_php_version_change"
url: https://docs.corefinity.com/mcp/tools/corestack_php_version_change
type: tool
last_updated: 2026-11-13
feature: php-runtime
related:
  - https://docs.corefinity.com/guides/sites/software-and-services/php-version.md
---
# corestack_php_version_change

**Change the PHP version.** Move a row to another PHP minor from corestack_php_runtime_get's versions, now or tonight. A change the version needs acknowledged is refused with ack_required naming what to acknowledge. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Runs as a task: yes

## When to use it

Move a row to another PHP minor from corestack_php_runtime_get's versions, now or tonight. A change the version needs acknowledged is refused with ack_required naming what to acknowledge.

## Inputs

- `site_id` (integer, ≥ 1, required): The row: the site or one of its environments.
- `to` (string, up to 8 characters, required): The PHP minor, e.g. 8.4.
- `apply` (one of `now`, `tonight`, default `"now"`): now (the default), or tonight in the row's maintenance window.
- `acknowledge` (array of one of `eol`, `app_constraint`, `extensions_off`, `ini_incompatible`, up to 4 items): What ack_required named, once you have told the person.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "acknowledge": {
      "description": "What ack_required named, once you have told the person.",
      "items": {
        "enum": [
          "eol",
          "app_constraint",
          "extensions_off",
          "ini_incompatible"
        ],
        "type": "string"
      },
      "maxItems": 4,
      "type": "array"
    },
    "apply": {
      "default": "now",
      "description": "now (the default), or tonight in the row's maintenance window. window: the row's next maintenance window (tonight is kept as its alias).",
      "enum": [
        "now",
        "window",
        "tonight"
      ],
      "type": "string"
    },
    "site_id": {
      "description": "The row: the site or one of its environments.",
      "minimum": 1,
      "type": "integer"
    },
    "to": {
      "description": "The PHP minor, e.g. 8.4.",
      "maxLength": 8,
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "to"
  ],
  "type": "object"
}
```

## Refusals

- `invalid_arguments`: `to` is not one of the minors this row is offered (corestack_php_runtime_get lists them; an end-of-life minor is offered only while Corefinity allows end-of-life versions).
- `invalid_arguments` with `details.refused_by: "app_php_floor"`: `to` is below the PHP version the row's own Composer dependencies need (its `vendor/composer/platform_check.php` would stop every request), e.g. "This shop's Composer dependencies need PHP 8.4.1 or later."; corestack_php_runtime_get shows that option as not allowed with the same reason. No acknowledgement covers it: deploy code that supports the lower version first. Where that requirement is unknown the version's `changes` say so, and the change is judged as before.
- `ack_required`: the change needs the person's acknowledgements first; `details.required` names the keys and `details.detail` their sentences; tell the person, then call again with them in `acknowledge`.
- `ini_invalid`: the custom php.ini has a line the new minor does not accept; `details.diagnostics` lists them; fix the file with corestack_php_ini_update first.
- `feature_off`: `apply: "tonight"` needs the maintenance window queue, which is switched off; leave `apply` out to make the change now.
- `change_pending`: a change is already queued for this row's maintenance window; apply or cancel it first (corestack_pending_changes_list).
- `busy`: another change is running on this row; wait for it (corestack_site_operation_get) and call again.
- `not_available`: this row's PHP version is not managed here; stop.
- `removed`: the row has been removed.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- `image_not_offered` (409): the PHP version this change needs is not one Corefinity offers right now (withdrawn, or not published yet). Nothing was changed; send it again once Corefinity offers that version.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_php_version_change",
  "arguments": {
    "site_id": 4211,
    "to": "8.4"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_php_version_change with site_id 4211, to 8.4. (Change the PHP version.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Change PHP version](https://docs.corefinity.com/guides/sites/software-and-services/php-version.md)
