---
title: "Start a new WordPress installation on a domain"
method: POST
path: "/WPX/create_website"
tags: ["WPX"]
---

# Start a new WordPress installation on a domain

`POST /WPX/create_website`

## Request

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

This function starts a new WordPress installation on a domain that the
caller owns. The installation runs in the background, so the function
returns as soon as it queues the task.

  **Note:**

  - Poll progress with `get_task_progress` and the returned `install_id`
    value. That works with a cPanel API token, unlike the `sse_url`
    stream, which needs an interactive cPanel session.
  - A domain that already has a WordPress installation is **not** an error.
    The call succeeds with the `status` field set to `collision` and
    lists the existing installations, and it queues nothing. To replace
    the existing site, call `remove_installation` for each entry in
    the `existing_installations` field, then call this function again.
  - The `data.status` field reports the outcome of this call. Do not confuse
    it with the `result.status` field, which reports whether the call itself
    succeeded.
  - This function needs the `redirects` and `mysql` features in addition to
    the `wp-toolkit` feature that the whole module needs. It also refuses
    the call when the account has too little free disk space, or when the
    account already holds as many WordPress websites as its plan allows.
  - The background task can still fail after this function returns, for
    example when a feature is revoked in the meantime. Read the outcome from
    `get_task_progress`.

## Request body `application/x-www-form-urlencoded`

- object
  - `domain` string, required: The domain to install WordPress on. The cPanel account must own the domain, and the domain must have its own document root. The system normalizes the value to lowercase.
  - `title` string: The WordPress site title. When you omit this parameter, the system uses the domain name as the title. The system rejects a title longer than 253 characters or one that holds control characters, but it does that in the background task, not in this call: an invalid title still returns a successful status, then fails the installation. Read the failure from `get_task_progress`.

## 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: On the normal start path the object contains the `status`, `domain`, `task_id`, `sse_url`, and `install_id` return values. When the domain already has a WordPress installation, the object instead contains the `status` field set to `collision`, plus the `domain` and `existing_installations` fields.
      - `blocked_by` string[]: Which PHP versions fall below the minimum. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `compatible` 1 | 0: Whether WordPress can install. Always `0`. Present only when the `status` field is `unsupported_php`.
      - `domain` string: The domain, normalized to lowercase.
      - `domain_package` string, nullable: The PHP package the domain runs. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `domain_version` string, nullable: The domain's PHP version as `major.minor`. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `domain_version_source` 'domain' | 'system_default', nullable: Where the domain's PHP version comes from. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `domain_version_vhost` string, nullable: The virtual host whose PHP setting to change in MultiPHP Manager. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `effective_version` string, nullable: The PHP version that decided the refusal, as `major.minor`. Present only when the `status` field is `unsupported_php`.
      - `existing_installations` object[]: The WordPress installations that already exist on the domain. Present only when the `status` field is `collision`, and never empty in that case.
        - `id` integer: The WordPress Toolkit installation id. Pass it to `remove_installation`.
        - `url` string: The site URL of the existing installation. This is an empty string when the system could not determine it.
      - `install_id` string: The unique correlator for the installation run. Pass it to `get_task_progress` to poll progress with a cPanel API token. Present only when the `status` field is `running`.
      - `is_fallback` 1 | 0: Whether a PHP version lookup failed. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `required_version` string: The minimum PHP version WordPress requires. Present only when the `status` field is `unsupported_php`.
      - `sse_url` string: The path to the Server-Sent Events stream that reports installation progress. This is a path, not a full URL. Resolve it against the cPanel host that served the request. An interactive cPanel session can read this stream, but a cPanel API token cannot. Present only when the `status` field is `running`.
      - `status` 'running' | 'collision' | 'unsupported_php': The outcome of this call. - `running` - The system queued the installation task. The `task_id`, `sse_url`, and `install_id` fields are present. - `collision` - The domain already has a WordPress installation. The `existing_installations` field is present, and the system queued nothing. - `unsupported_php` - The PHP version is below the WordPress minimum. The `get_php_compatibility` function's return fields are present, and the system queued nothing.
      - `system_default_package` string, nullable: The server's default PHP package. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `system_default_version` string, nullable: The server's default PHP version as `major.minor`. Present only when the `status` field is `unsupported_php`. See the `get_php_compatibility` function.
      - `task_id` string: The queued installation task id. Pass it to `get_task_status` to check whether the task is still queued. Present only when the `status` field is `running`.
    - `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 warning, 11 info
  - added the new `unsupported_php` enum value to the `result/data/status` response property for the response status `200`
  - added the optional property `result/data/blocked_by` to the response with the `200` status
  - added the optional property `result/data/compatible` to the response with the `200` status
  - added the optional property `result/data/domain_package` to the response with the `200` status
  - …8 more
- **2026-09-23** `aed66b1a51cc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cpanel/apis/cpanel-uapi/changes/WPX/create_website/post.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)
