Complete install

Finish the WordPress installation on a freshly-installed site.


POST/api/servers/{server}/sites/{id}/wordpress/complete-install

Complete install

Runs wp core install with the provided site and admin credentials — the programmatic equivalent of completing the wp-admin installer in the browser. On success, Ploi clears the internal needs_setup flag on the site so the "Setup" tab disappears in the panel.

Requires WP-CLI to be installed on the server. This endpoint is idempotent: if WordPress is already installed, the call succeeds and the setup flag is cleared.

Required attributes

  • Name
    site_title
    Type
    string
    Description

    The site title, shown in the browser tab and as blogname in WordPress.

  • Name
    admin_username
    Type
    string
    Description

    The admin user's login name. 3–60 characters. Letters, numbers, spaces, and . _ - @ are allowed.

  • Name
    admin_email
    Type
    string
    Description

    The admin user's email address. Must be a valid email.

  • Name
    admin_password
    Type
    string
    Description

    The admin user's password. Minimum 8 characters.

Request

POST
/api/servers/{server}/sites/{id}/wordpress/complete-install
curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/wordpress/complete-install" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "site_title": "My awesome site",
    "admin_username": "admin",
    "admin_email": "[email protected]",
    "admin_password": "a-strong-password"
  }'

Response

{
  "status": "ok",
  "message": "WordPress has been installed successfully."
}

Already installed

{
  "status": "ok",
  "message": "WordPress was already installed. Setup marked complete."
}

Error — WP-CLI missing

{
  "errors": [
    "WP-CLI is not installed or the server is unreachable."
  ]
}