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

**Change a site's Varnish version.** Change a Magento 2 row's Varnish version, up or down, while Varnish is on. Your VCL is compiled on the target first. The cache starts empty. Scope: write. Long-running: answers with a task.

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

## When to use it

Change the Varnish version of a Magento 2 row while Varnish is on, up or down. Read `corestack_varnish_get` first: only versions in `options[]` with `allowed: true` are accepted, and `recommended` marks the version Adobe certifies for the installed Magento patch.

Before anything changes, the row's saved custom VCL is compiled against the target version; if it does not compile, nothing changes and the refusal lists each problem with its hook, line and column (fix the VCL with `corestack_varnish_vcl_validate` and `corestack_varnish_vcl_update`, passing `varnish_version` to validate against the target). Then one line of the site's settings changes, Varnish is rolled to the new version and the quick cache check runs. The cache starts empty, so the first requests for each page go to Magento.

The change takes about a minute and answers a task on its `varnish_version` operation (follow it with `corestack_site_operation_get`). With `apply: window` it waits for the row's next maintenance window and answers at once `{operation: null, queued: true, window_date, item_id, window}`; the VCL is compiled again when the window opens. While Varnish is off, choose the version as you switch it on: `corestack_varnish_set` with `version`.

## Inputs

- `site_id` (integer, ≥ 1, required): the row, a Magento 2 site or one of its environments.
- `to` (string, at most 8 characters, required): the version, such as `8.0`.
- `acknowledge` (array of string, `["eol"]`): required when the target's `status` is `eol` (end of life upstream; Corefinity keeps its image patched).
- `apply` (string, `now` or `window`; `tonight` is kept as an alias of `window`): now (the default), or in the row's next maintenance window.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "acknowledge": {
      "description": "[\"eol\"] for an end-of-life target.",
      "items": {
        "enum": [
          "eol"
        ],
        "type": "string"
      },
      "maxItems": 1,
      "type": "array"
    },
    "apply": {
      "default": "now",
      "description": "now, or tonight. window: the row's next maintenance window (tonight is kept as its alias).",
      "enum": [
        "now",
        "window",
        "tonight"
      ],
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "to": {
      "description": "An allowed version, e.g. 8.0.",
      "maxLength": 8,
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "to"
  ],
  "type": "object"
}
```

## Refusals

- `varnish_off`: Varnish is switched off; switch it on with `corestack_varnish_set` and `version`.
- `version_unsupported`: the version is not allowed for this Magento; the message names the offered versions.
- `vcl_incompatible`: the saved VCL does not compile on the target; `details.diagnostics` lists `{hook, line, column, severity, kind, message}`. Nothing changed.
- `not_available`: this row's Varnish version cannot be managed from here; contact support.
- `temporarily_unavailable`: the compile check could not run just now; try again in a minute.
- `change_in_progress` or `busy`: another change on the row is unfinished; `change_pending`: a change waits for the window.
- `invalid_arguments`: an `eol` target without `acknowledge: ["eol"]`, or a malformed input; `fields` names the argument.
- `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.
- 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_varnish_version_change",
  "arguments": {
    "site_id": 4211,
    "to": "8.0",
    "acknowledge": [
      "eol"
    ]
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_varnish_version_change with site_id 4211, to 8.0, acknowledge ["eol"]. (Change a site's Varnish version.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Varnish](https://docs.corefinity.com/guides/sites/software-and-services/varnish.md)
