Install plugin

Install a WordPress plugin from the WordPress.org repository.


POST/api/servers/{server}/sites/{id}/wordpress/plugins/install

Install plugin

Installs a WordPress plugin by its slug from the WordPress.org repository. Optionally activates the plugin after installation. Requires WP-CLI to be installed on the server.

Required attributes

  • Name
    plugin
    Type
    string
    Description

    The plugin slug to install (e.g. wordfence). Must contain only lowercase letters, numbers, and hyphens.

Optional attributes

  • Name
    activate
    Type
    boolean
    Description

    When set to true, the plugin will be activated immediately after installation. Defaults to false.

Query parameters

  • Name
    ondemand
    Type
    boolean
    Description

    When set to true, the command runs synchronously and returns the result directly. When omitted or false (default), the action is queued and processed in the background.

Request

POST
/api/servers/{server}/sites/{id}/wordpress/plugins/install
curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/wordpress/plugins/install?ondemand=true" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"plugin": "wordfence", "activate": true}'

Response

{
  "status": "ok",
  "message": "Plugin installed."
}