wp-toolkit: WP Toolkit
The wp-toolkit
utility allows you to perform certain actions on
WordPress installations.
Note: This utility is available when the WP 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. Requires the following options: To show output in a particular format, specify the |
To clear the cache of the WordPress installation with the ID 1:
|
--clear-wpt-cache |
Clears the WP Toolkit cache. |
To clear the WP Toolkit cache:
|
|
--register |
[option] |
Adds a WordPress installation to WP Toolkit. Requires the To show output in a particular format, specify the |
To add the WordPress installation on the domain with the ID 1 to WP Toolkit:
|
--info |
[option] |
Displays the detailed information about the selected WordPress installation. Requires the following options: To show output in a particular format, specify the |
To display information about the WordPress installation with the ID 1:
|
--config |
[option] |
Manages WP Toolkit settings. Requires the If If To show output in a particular format, specify the |
To display a list of WP Toolkit settings and their values:
|
--wp-cli |
[option] |
Executes a Requires the |
To display all plugins for the WordPress installation with the ID 1:
|
--list |
Displays a brief description of WordPress installations existing on the server. To specify filters, use the following options: To show output in a particular format, specify the |
To display a brief description of all WordPress installations existing on the server:
|
|
--help or -h
|
Displays help on the use of this utility. |
To view the help info on the use of this utility:
or
|
|
--install |
[option] |
Installs WordPress on a domain. Requires the Can be used with the following options:
To show output in a particular format, specify the |
To install WordPress with the default settings on the domain example.com:
|
--clone |
[option] |
Clones a WordPress website to another domain and/or subdirectory. Requires the Can be used with the following options:
To show output in a particular format, specify the |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2:
|
--copy-data |
[option] |
Copies the content of your WordPress website including files and database to another WordPress website. Requires the Can be used with the following options:
To show output in a particular format, specify the |
To copy the content of the website with the ID 1 to the website with the ID 2:
|
--detach |
[option] |
Detaches a WordPress website. Requires the following options: |
To detach the WordPress installation with the ID 1:
|
--languages |
[option] |
Displays the list of languages available for the specified
WordPress version. Requires the To show output in a particular format, specify the |
To display the list of languages available for WordPress version 4.9.8 in the JSON format:
|
--sets |
[option] |
Manages sets of plugins and themes. Requires the To show output in a particular format, specify the |
To display available sets of plugins and themes:
|
--plugins |
[option] |
Manages uploaded plugins. Requires the To use To use To show output in a particular format, specify the |
To display all uploaded plugins:
|
--themes |
[option] |
Manages uploaded themes. Requires the To show output in a particular format, specify the |
To remove the uploaded theme that has the ID 1 and the version 1.4:
|
--smart-update |
[option] |
Enables and disables Smart Updates for a website. Requires the following options: To show output in a particular format, specify the |
To enable Smart Updates for the WordPress installation with the ID 1:
|
--versions |
Displays available WordPress versions that can be installed via WP Toolkit. To show output in a particular format, specify the |
To display available WordPress versions that can be installed via WP Toolkit:
|
Options
Command | Parameter | Description | Example |
---|---|---|---|
-instance-id |
<instance_id> |
WordPress installation ID. |
To activate plugin “hello” on the WordPress installation with the ID 1:
|
-main-domain-id |
<main_domain_id> |
Main domain ID. |
To display information about the WordPress installation with the ID 1:
|
-path |
<path> |
The relative path from the domain’s document root directory, for example, /subdirectory . |
To add the WordPress installation on the domain with the ID 1 to WP Toolkit:
|
-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:
|
|
-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:
|
|
-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:
|
-domain-id |
<domain-id> |
The domain ID. |
To install WordPress with the default settings on the domain with the ID 1:
|
-domain-name |
<domain_name> |
The domain name. |
To install WordPress with the default settings on the domain example.com:
|
-operation |
Necessary for certain commands to specify the corresponding operation. |
To display all uploaded themes:
|
|
-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:
|
-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:
|
-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
|
-db-user |
<database_user> |
The database user name. Used with the To specify the database user password, use the |
To install WordPress on the domain with the ID 1 and name the
WordPress database user
|
-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
|
-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:
|
-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:
|
-version |
<version> |
The WordPress version. Used with the --install command. |
To install WordPress version 4.9.8 on the domain with the ID 1:
|
-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:
|
-username |
<username> |
Specifies the administrator username. Used with the To specify the administrator password, use the |
To install WordPress on the domain
|
-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:
|
-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:
|
-plugin-id |
<plugin_id> |
The ID of an uploaded plugin. Used with the --sets command and the add-plugin and
remove-plugin operations. |
To add the uploaded plugin with the ID 1 to the set with the ID 1:
|
-theme-id |
<theme_id> |
The ID of an uploaded theme. Used with the --sets command and the add-theme and
remove-theme operations. |
To add the uploaded theme with the ID 1 to the set with the ID 1:
|
-plugin-slug |
<plugin_slug> |
The plugin slug for adding or removing plugins found in the
wordpress.org repository. Used with the --sets command and the add-plugin and
remove-plugin operations. |
To remove the plugin with the slug “akismet” from the set with the ID 1:
|
-theme-slug |
<theme_slug> |
The theme slug for adding or removing themes found in the
wordpress.org repository. Used with the -sets command and the add-theme and
remove-theme operations. |
To add the theme with the slug “breviter” to the set with the ID 1:
|
-source-instance-id |
<source-instance-id> |
The source WordPress website ID. Used with the --clone and --copy-data commands. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2: `` plesk ext wp-toolkit –clone -source-instance-id 1 -target-domain-id 2`` |
-target-domain-name |
<target-domain-name> |
The target domain name. Used with the --clone command. |
To clone the WordPress installation with the ID 1 to the target domain
|
-target-domain-id |
<target-domain-id> |
The target domain ID. Used with the --clone command. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2:
|
-target-path |
<target-path> |
The path inside the target domain’s document root. Used with the If the option is not specified, a WordPress website is cloned to the domain root directory. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 and the
|
-target-db-name |
<target-db-name> |
The target database name (generated automatically if not specified). Used with the --clone command. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 and name the created database
|
-target-db-user-login |
<target-db-user-login> |
The username of the target database user (generated automatically if not specified). Used with the To specify a password for the database user, use the |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 and name the database user
|
-target-db-server-id |
<target-db-server-id> |
The ID of the target MySQL database server. Used with the If the option is not specified, the default database server is used on the target domain. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 and assign the ID 2 to the target MySQL database server:
|
-force-overwrite |
yes | no
|
Used with the --clone command. If the option is set to “yes”, WP Toolkit overwrites data on the target domain and path ignoring any existing WordPress installations and other potential website data.
The default state of the option is “no”. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 overwriting an existing WordPress installation on the target domain:
|
-show-progress |
yes | no
|
Manages if the progress of an operation is shown or not. By default, the option is set to “yes” and the progress is displayed (unless you specify the JSON output format). If set to “no”, the operation is performed silently. |
To clone the WordPress installation with the ID 1 to the target domain with the ID 2 without showing the cloning progress:
|
-option-name |
<option-name> |
The WP Toolkit setting name. The option is used with the --config command and the -operation option. |
To see the value of the
|
-option-value |
<option-value> |
The WP Toolkit setting value. The option is used with the --config command and the -operation option that has the set argument. |
To set the
|
-target-instance-id |
<target-instance-id> |
The target WordPress website ID. Used with the --copy-data command. |
To copy the content of the website with the ID 1 to the website with the ID 2:
|
-data-to-copy |
all | files | db
|
Used with the --copy-data command. Specifies what data to copy: files and database, files only, or database only. |
To copy the content of the website (files only) with the ID 1 to the website with the ID 2:
|
-files-replace-modified |
yes | no
|
Used with the --copy-data command. Set to “yes” by default.
When set to “yes”, it replaces files modified on the target with files from the source even if the source files are older. |
To copy the content of the website with the ID 1 to the website with the ID 2 and prohibit overwriting files on the target with the files from the source that are older:
|
-files-remove-missing |
yes | no
|
Used with the --copy-data command.
When set to “yes”, it removes files existing on the target but absent from the source. |
To copy the content of the website with the ID 1 to the website with the ID 2 and remove files existing on the target but absent from the source:
|
-db-tables-copy-mode |
default | all | new | selected
|
Used with the
|
To copy the content of the website with the ID 1 to the website with the ID 2 copying all database tables:
|
-db-tables |
A comma-separated list of database tables. |
Used with the Specifies which database tables to copy. |
To copy the content of the website with the ID 1 to the website with the ID 2 copying the
|
-exclude-db-tables |
A comma-separated list of database tables. |
Used with the Specifies which database tables to exclude from copying. |
To copy the content of the website with the ID 1 to the website with the ID 2 excluding the
|
-create-restore-point |
yes | no
|
Used with the When set to “yes”, it creates a restore point you can later use to revert the changes made during copying if something goes wrong. |
To copy the content of the website with the ID 1 to the website with the ID 2 and not to create a restore point:
|
-username |
<username> |
Used with the To specify the administrator password, use the |
To install WordPress on the domain
|
-auto-updates |
true | false | minor
|
Configures automatic WordPress updates. Set to minor (security) updates by default. Used with the |
To install WordPress on the domain
|
-plugins-auto-updates |
true | false
|
Turns on and off automatic updates of WordPress plugins. Set to false by default. Used with the |
To install WordPress on the domain
|
-themes-auto-updates |
true | false
|
Turns on and off automatic updates of WordPress themes. Set to false by default. Used with the |
To install WordPress on the domain
|