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

**Application PHP requirements.** The application's PHP requirements read from composer.lock or WordPress: the PHP constraint, the extensions it needs, those the row does not load and the PHP versions outside its range. refresh reads the live site first. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

See what the application on a row needs from PHP, read from its composer.lock or WordPress's version file: the PHP constraint and range, the `ext-*` extensions it needs, the extensions the row does not load (`missing_extensions`) and the PHP versions outside its range (`outside_range`). It answers what was read last; `refresh: true` reads the live site first (at most once every few minutes; a failed read leaves the stored answer as it was). Check it before a PHP version change.

## Inputs

- `site_id` (integer, ≥ 1, required): The row: the site or one of its environments.
- `refresh` (boolean): Read the live site first (at most once every few minutes).

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "refresh": {
      "description": "Read the live site first (at most once every few minutes).",
      "type": "boolean"
    },
    "site_id": {
      "description": "The row: the site or one of its environments.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- `not_running`: the site is not running, so it cannot be read; the stored answer stays.
- `switched_off`: running commands on sites is switched off at the moment.
- `layout_unknown`: the site's htdocs is not a release the Control Panel deployed, so the requirements cannot be read from it; the stored answer stays.
- `requirements_unreadable`: composer.lock or WordPress's version file is there but cannot be read as the application's file (outside the site root, not a regular file, unreadable or over 8 MiB); the stored answer stays.
- 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_requirements_get",
  "arguments": {
    "site_id": 4211,
    "refresh": true
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_php_requirements_get with site_id 4211, refresh true. (Application PHP requirements.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [GET /api/corestack/sites/{site}/php-runtime/requirements](https://docs.corefinity.com/api/reference/runtime/get-php-requirements.md)
- Guide: [Change PHP version](https://docs.corefinity.com/guides/sites/software-and-services/php-version.md)
