---
title: "Return PHP compatibility"
method: GET
path: "/WPX/get_php_compatibility"
tags: ["WPX"]
---

# Return PHP compatibility

`GET /WPX/get_php_compatibility`

## Request

- Base URL: `https://cpanel-server.tld:2083/execute`
- URL: `https://cpanel-server.tld:2083/execute/WPX/get_php_compatibility`
- Auth: HTTP basic

This function reports whether the PHP version a WordPress installation
would run under meets the minimum that WordPress requires.

  **Note:**

  * Two PHP versions must pass: the server's system default PHP, which
    WordPress Toolkit uses while it stages the installation outside the
    document root, and the domain's own PHP, which serves the site
    afterwards.
  * A cPanel user can change a domain's PHP version in MultiPHP Manager,
    but only the hosting provider can change the system default.
  * The `create_website`, `create_nova_for_wordpress_website`, and
    `import_website` functions run the same check. When it fails, they
    return the `status` field set to `unsupported_php` with this
    function's data.

## Query parameters

- `domain` string

## Response `200`

The HTTP request was successful.

- object
  - `apiversion` integer: The version of the API.
  - `func` string: The name of the method called.
  - `module` string: The name of the module called.
  - `result` object
    - `data` object: The PHP compatibility verdict.
      - `blocked_by` string[]: Which PHP versions fall below the minimum. Empty when `compatible` is `1`. - `system_default` - The server default PHP is too old. Only the hosting provider can change it. - `domain` - The domain's PHP is too old. Change it in MultiPHP Manager, on the row that the `domain_version_vhost` return field names.
      - `compatible` 1 | 0: Whether WordPress can install. - `1` - Every known PHP version meets the minimum. - `0` - At least one version in `blocked_by` is too old.
      - `domain` string, nullable: The evaluated domain, normalized to lowercase. `null` when no domain was given.
      - `domain_package` string, nullable: The PHP package the domain runs. `null` when no domain was given or the account has no virtual host for it.
      - `domain_version` string, nullable: The domain's PHP version as `major.minor`. `null` when unknown.
      - `domain_version_source` 'domain' | 'system_default', nullable: Where the domain's version comes from. - `domain` - Set on the domain or an ancestor document root. - `system_default` - Inherited from the server default.
      - `domain_version_vhost` string, nullable: The virtual host whose PHP setting `domain_version` comes from. This is the row to change in MultiPHP Manager. For a parked (alias) domain, the subdomain behind an addon domain, or a domain that inherits an ancestor document root's setting, this differs from `domain`. `null` when the version is inherited from the system default or is unknown.
      - `effective_version` string, nullable: The lowest known version of the two, which is the version that decides the verdict. `null` when neither is known.
      - `is_fallback` 1 | 0: - `1` - A version lookup failed. The unknown version did not block, so the verdict may be optimistic. The installation itself reports any problem. - `0` - Every lookup succeeded.
      - `required_version` string: The minimum PHP version WordPress requires, as `major.minor`.
      - `system_default_package` string, nullable: The server's default PHP package. `null` when unknown.
      - `system_default_version` string, nullable: The server's default PHP version as `major.minor`. `null` when unknown.
    - `errors` string[], nullable: List of errors if the API failed.
    - `messages` string[], nullable: List of messages generated by the API.
    - `metadata` object
      - `transformed` 1: Post-processing may have transformed the data.
    - `status` 1 | 0: - `1` - Success. - `0` - Failed: Check the errors field for more details.
    - `warnings` string[], nullable: List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.

## Changes

- **2026-11-04** `05239220da37`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cpanel/apis/cpanel-uapi/changes/WPX/get_php_compatibility/get.md)

---

[API](https://skmtc.dev/cpanel/apis/cpanel-uapi.md) - [All operations](https://skmtc.dev/cpanel/apis/cpanel-uapi/llms.txt) - [OpenAPI document](https://skmtc.dev/cpanel/apis/cpanel-uapi/revisions/05239220da37?raw)
