# wp-toolkit: WordPress Toolkit

The `wp-toolkit` utility allows you to perform certain action on WordPress installations.

Note

This utility is available when the WordPress toolkit extension is installed in Plesk and is used with the `plesk ext` utility.

Additionally, WP-CLI (official WordPress command-line interface) is integrated into `wp-toolkit` utility. You can invoke it with the `wp-cli` command and use it to manage WordPress websites.

Read more about WP-CLI.

## Usage

    plesk ext wp-toolkit <command> [options]

## Example

The following command provides main data for all WordPress installations existing on the server:

    plesk ext wp-toolkit --list

## Commands

Command | Parameter | Description | Example
--- | --- | --- | ---
`--clear-cache` | [option] | Clears the cache of the selected WordPress installation. | To clear the cache of the WordPress installation with the ID = 1: `plesk ext wp-toolkit --clear-cache -instance-id 1`
`--register` | [option] | Adds the WordPress installation to WordPress Toolkit. | To add the WordPress installation on the domain with the ID = 1 to WordPress toolkit: `plesk ext wp-toolkit --register -main-domain-id 1 -path httpdocs`
`--info` | [option] | Provides data on the selected WordPress installation. | To provide data on the WordPress installation with the ID = 1: `plesk ext wp-toolkit -info -instance-id 1`
`--wp-cli` | [option] | Executes a `wp-cli` command on the selected WordPress installation. | To display the WordPress version of the WordPress installation with the ID = 1: `plesk ext wp-toolkit --wp-cli -instance-id 1 -- core version`
`--list` | [option] | Provides main data for all WordPress installations existing on the server. | To provide main data for all WordPress installations existing on the server: `plesk ext wp-toolkit --list`
`--help` or `-h` | [option] | Displays help on the use of this utility. | To view the help info on the use of this utility: `plesk ext wp-toolkit --help` or `plesk ext wp-toolkit -h`
`--install` | [option] | Installs WordPress on a domain. | To install WordPress with the default settings on the domain example.com: `plesk ext wp-toolkit --install -domain-name example.com`
`--languages` | [option] | Displays the list of languages available for the specified WordPress version. | To display the list of languages available for WordPress version 4.9.8 in the JSON format: `plesk ext wp-toolkit --languages -version 4.9.8 -format json`
`--sets` | [option] | Manages sets of plugins and themes. | To display available sets of plugins and themes: `plesk ext wp-toolkit --sets -operation list`
`--plugins` | [option] | Manages uploaded plugins. | To display all uploaded plugins: `plesk ext wp-toolkit --plugins -operation list-custom`
`--themes` | [option] | Manages uploaded themes. | To remove the uploaded theme with the ID 1 and the version 1.4: `plesk ext wp-toolkit --themes -operation remove -id 1 -version 1.4`
`--versions` | [option] | Displays available WordPress versions that can be installed via WordPress Toolkit. | To display available WordPress versions that can be installed via WordPress Toolkit: `plesk ext wp-toolkit --versions`

## Options

Command | Parameter | Description | Example
--- | --- | --- | ---
`-instance-id` | `<instance_id>` | WordPress installation ID. | To activate plugin “hello” on the WordPress installation with the ID = 1: `plesk ext wp-toolkit --wp-cli -instance-id 1 -- plugin activate hello`
`-main-domain-id` | `<main_domain_id>` | Main domain ID. | To provide data on the WordPress installation with the ID = 1: `plesk ext wp-toolkit --info -main-domain-id 1 -path httpdocs`
`-path` | `<path>` | The relative path from the main domain’s root directory. Example: `/httpdocs/subdirectory` | To add the WordPress installation on the domain with the ID = 1 to WordPress toolkit: `plesk ext wp-toolkit --register -main-domain-id 1 -path httpdocs`
`-plugins` |  | Adds information about the number of plugins on WordPress installations when the `list` command is executed. | To display main data (including the number of plugins) on all WordPress installations existing on the server: `plesk ext wp-toolkit --list -plugins`
`-themes` |  | Adds information about the number of plugins on WordPress installations. when the `list` command is executed. | To display main data (including the number of themes) on all WordPress installations existing on the server: `plesk ext wp-toolkit --list -themes`
`-format` | `raw | json` | Renders output in a particular format. Supported formats: JSON, raw. By default all data is shown in the raw format. | To display main data on all WordPress installations existing on the server in the JSON format: `plesk ext wp-toolkit --list -format json`
`-domain-id` | <`domain-id`> | The domain ID. | To install WordPress with the default settings on the domain with the ID 1: `plesk ext wp-toolkit --install -domain-id 1`
`-domain-name` | `<domain_name>` | The domain name. | To install WordPress with the default settings on the domain example.com: `plesk ext wp-toolkit --install -domain-name example.com`
`-operation` |  | Necessary for certain commands to specify the corresponding operation. | To display all uploaded themes: `plesk ext wp-toolkit --themes -operation list-custom`
`-site-title` | `<site_title>` | The website title (used with the `install` command). | To install WordPress with the site title “Example Site” on the domain with the ID 1: `plesk ext wp-toolkit --install -domain-id 1 -site-title "Example Site"`
`-protocol` | `http | https` | The protocol name (used with the `install` command). | To install WordPress on the domain with the ID 1 and enable the website via the HTTP protocol: `plesk ext wp-toolkit --install -domain-id 1 -protocol http`
`-db-name` | `<database_name>` | The database name (used with the `install` command). | To install WordPress on the domain with the ID 1 and name the WordPress database “a1”: `plesk ext wp-toolkit --install -domain-id 1 -db-name a1`
`-table-prefix` | `<table_prefix>` | The table prefix (used with the `install` command). | To install WordPress on the domain with the ID 1 and name the table prefix “aaa”: `plesk ext wp-toolkit --install -domain-id 1 -table-prefix aaa`
`-db-server` | `IP address of the remote database server |localhost:3306` | The database server (used with the `install` command). | To install WordPress on the domain with the ID 1 using the local database server for hosting the WordPress database: `plesk ext wp-toolkit --install -domain-id 1 -db-server localhost:3306`
`-language` | `<locale_name>` | The WordPress language (used with the `install` command). | To install WordPress on the domain with the ID 1 and choose the English language of the WordPress interface: `plesk ext wp-toolkit --install -domain-id 1 -language en_US`
`-version` | `<version>` | The WordPress version (used with the `install` command). | To install WordPress version 4.9.8 on the domain with the ID 1: `plesk ext wp-toolkit --install -domain-id 1 -version 4.9.8`
`-admin-email` | `<admin-email>` | The email of the WordPress administrator (used with the `install` command). | To install WordPress on the domain with the ID 1 and specify the email of the WordPress administrator: `plesk ext wp-toolkit --install -domain-id 1 -admin-email mail@example.com`
`-set-id` | `<set_id>` | The ID of a set for installing or removing plugins and themes. | To add the plugin with the ID 1 to the set with the ID 1: `plesk ext wp-toolkit --sets -operation add-plugin -set-id 1 -plugin-id 1`
`-source-url` | `<source_url>` | The source URL, by which a plugin or a theme is available (used to upload plugins and themes). | To upload a plugin available by the known URL: `plesk ext wp-toolkit --plugins -operation add -source-url https://downloads.wordpress.org/plugin/hello-dolly.1.6.zip`
`-plugin-id` | `<plugin_id>` | The ID of an uploaded plugin (used with the `add-plugin` and `remove-plugin` operations). | To add the uploaded plugin with the ID 1 to the set with the ID 1: `plesk ext wp-toolkit --sets -operation add-plugin -set-id 1 -plugin-id 1`
`-theme-id` | `<theme_id>` | The ID of an uploaded theme (used with the `add-theme` and `remove-theme` operations). | To add the uploaded theme with the ID 1 to the set with the ID 1: `plesk ext wp-toolkit --sets -operation add-theme -set-id 1 -theme-id 1`
`-plugin-slug` | `<plugin_slug>` | The plugin slug for adding or removing plugins found in the wordpress.org repository (used with the `add-plugin` and `remove-plugin` operations). | To remove the plugin with the slug “akismet” from the set with the ID 1: `plesk ext wp-toolkit --sets -operation remove-plugin -set-id 1 -plugin-slug akismet`
`-theme-slug` | `<theme_slug>` | The theme slug for adding or removing themes found in the wordpress.org repository (used with the `add-theme` and `remove-theme` operations). | To add the theme with the slug “breviter” to the set with the ID 1: `plesk ext wp-toolkit --sets -operation add-theme -set-id 1 -theme-slug breviter`