wp-toolkit <command> [options]
--clear-cache
-instance-id
| -main-domain-id
and -path
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
:wp-toolkit --clear-cache -instance-id 1
--clear-wpt-cache
wp-toolkit --clear-wpt-cache
--register
-main-domain-id
and -path
options.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format1
to WP Toolkit:wp-toolkit --register -main-domain-id 1 -path httpdocs
--info
-instance-id
| -main-domain-id
and -path
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
:wp-toolkit --info -instance-id 1
--config
-operation
option with the following arguments: list
| get
| set
| rollback
.get
| rollback
is used, you need to specify the -option-name
option.set
is used, you need to specify the -option-name
and option-value
options. You cannot set read-only settings.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --config -operation list
--wp-cli
wp-cli
command on the selected WordPress installation.-instance-id
| -main-domain-id
and -path
options and a wp-cli
subcommand.1
:wp-toolkit --wp-cli -instance-id 1 -- plugin list
--list
-main-domain-id
| -plugins
| -themes
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --list
--help
or -h
wp-toolkit --help
wp-toolkit -h
--install
-main-domain-id
or -domain-name
option.-username
, -admin-email
, -protocol
, -path
, -version
, -language
, -db-server
, -db-name
, -db-user
, -table-prefix
, -set-id
, -site-title
, -auto-updates
, -plugins-auto-updates
, -themes-auto-updates
, -format
, -show-progress
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --install -domain-name example.com
--clone
-source-instance-id
and -target-domain-name
| -target-domain-id
options.-target-path
, -target-db-name
, -target-db-server-id
, -target-db-user-login
, -force-overwrite
, -show-progress
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
to the target domain with the ID 2:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2
--copy-data
-source-instance-id
and -target-instance-id
options.-data-to-copy
, -files-replace-modified
, -files-remove-missing
, -db-tables-copy-mode
, -db-tables
, -exclude-db-tables
, -create-restore-point
, -show-progress
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
to the website with the ID 2:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2
--detach
-instance-id
| -main-domain-id
and -path
.1
:wp-toolkit --detach -instance-id 1
--languages
-version
option.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --languages -version 4.9.8 -format json
--sets
-operation
option with the following arguments: list
| info
| add
| remove
| install
| rename
| add-plugin
| add-theme
| activate-plugin
| activate-theme
| deactivate-plugin
| deactivate-theme
| remove-plugin
| remove-theme
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --sets -operation list
--plugins --skip-plugins=false
-operation
option with the following arguments: list-custom
| add
| remove
.add
, you need to specify the location of the plugin you want to upload (the -source-url
| -path
option).remove
, you need to specify the ID and version of the plugin (the -id
and -version
options).-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --plugins-operation list-custom
--themes
-operation
option with the following arguments: list-custom
| add
| remove
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
and the version 1.4:wp-toolkit --themes --skip-themes=false -operation remove -id 1 -version 1.4
--smart-update
-instance-id
| -main-domain-id
and -path
.-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.1
:wp-toolkit --smart-update -instance-id 1
--versions
-format
option. Supported formats: JSON, raw. By default, all data is shown in the raw format.wp-toolkit --versions
-instance-id
<instance_id>
1
:wp-toolkit --wp-cli -instance-id 1 -- plugin activate hello
-main-domain-id
<main_domain_id>
1
:wp-toolkit --info -main-domain-id 1 -path httpdocs
-path
<path>
/subdirectory
.1
to WP Toolkit:wp-toolkit --register -main-domain-id 1 -path httpdocs
-plugins
list
command is executed.wp-toolkit --list -plugins
-themes
list
command is executed.wp-toolkit --list -themes
-format
raw | json
wp-toolkit --list -format json
-domain-id
<domain-id>
1
:wp-toolkit --install -domain-id 1
-domain-name
<domain_name>
wp-toolkit --install -domain-name example.com
-operation
wp-toolkit --themes -operation list-custom
-site-title
<site_title>
--install
command.1
:wp-toolkit --install -domain-id 1 -site-title "Example Site"
-protocol
http
| https
--install
command.1
and enable the website via the HTTP protocol:wp-toolkit --install -domain-id 1 -protocol http
-db-name
<database_name>
--install
command.1
and name the WordPress database a1
:wp-toolkit --install -domain-id 1 -db-name a1
-db-user
<database_user>
--install
command.DB_PASSWORD
environment variable.1
and name the WordPress database user db_user
:wp-toolkit --install -domain-id 1 -db-user db_user
-table-prefix
<table_prefix>
--install
command.1
and name the table prefix aaa
:wp-toolkit --install -domain-id 1 -table-prefix aaa
-db-server
IP address of the remote database server
| localhost:3306
--install
command.1
using the local database server for hosting the WordPress database:wp-toolkit --install -domain-id 1 -db-server localhost:3306
-language
<locale_name>
--install
command.1
and choose the English language of the WordPress interface:wp-toolkit --install -domain-id 1 -language en_US
-version
<version>
--install
command.1
:wp-toolkit --install -domain-id 1 -version 4.9.8
-admin-email
<admin-email>
--install
command.1
and specify the email of the WordPress administrator:wp-toolkit --install -domain-id 1 -admin-email mail@example.com
-username
<username>
--install
command.ADMIN_PASSWORD
environment variable.example.com
naming the administrator “WP_admin”:wp-toolkit --install -domain-name example.com -username WP_admin
-set-id
<set_id>
1
to the set with the ID 1
:wp-toolkit --sets -operation add-plugin -set-id 1 -plugin-id 1
-source-url
<source_url>
wp-toolkit --plugins -operation add -source-url https://downloads.wordpress.org/plugin/hello-dolly.1.6.zip
-plugin-id
<plugin_id>
--sets
command and the add-plugin
and remove-plugin
operations.1
to the set with the ID 1:wp-toolkit --sets -operation add-plugin -set-id 1 -plugin-id 1
-theme-id
<theme_id>
--sets
command and the add-theme
and remove-theme
operations.1
to the set with the ID 1:wp-toolkit --sets -operation add-theme -set-id 1 -theme-id 1
-plugin-slug
<plugin_slug>
--sets
command and the add-plugin
and remove-plugin
operations.1
:wp-toolkit --sets -operation remove-plugin -set-id 1 -plugin-slug akismet
-theme-slug
<theme_slug>
-sets
command and the add-theme
and remove-theme
operations.wp-toolkit --sets -operation add-theme -set-id 1 -theme-slug breviter
-source-instance-id
<source-instance-id>
--clone
and --copy-data
commands.1
to the target domain with the ID 2:wp-toolkit –clone -source-instance-id 1 -target-domain-id 2
-target-domain-name
<target-domain-name>
--clone
command.1
to the target domain example.com
:wp-toolkit --clone -source-instance-id 1 -target-domain-name example.com
-target-domain-id
<target-domain-id>
--clone
command.1
to the target domain with the ID 2:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2
-target-path
<target-path>
--clone
command.1
to the target domain with the ID 2 and the subdirectory
directory:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -target-path subdirectory
-target-db-name
<target-db-name>
--clone
command.1
to the target domain with the ID 2 and name the created database wp_database
:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -target-db-name wp_database
-target-db-user-login
<target-db-user-login>
--clone
command.TARGET_DB_USER_PASSWORD
environment variable.1
to the target domain with the ID 2 and name the database user wp_user
:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -target-db-user-login wp_user
-target-db-server-id
<target-db-server-id>
--clone
command.1
to the target domain with the ID 2 and assign the ID 2 to the target MySQL database server:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -target-db-server-id 2
-force-overwrite
yes
| no
--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”.1
to the target domain with the ID 2 overwriting an existing WordPress installation on the target domain:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -force-overwrite yes
-show-progress
yes
| no
1
to the target domain with the ID 2 without showing the cloning progress:wp-toolkit --clone -source-instance-id 1 -target-domain-id 2 -show-progress no
-option-name
<option-name>
--config
command and the -operation
option.transportOptionDelete
setting:wp-toolkit --config -operation get -option-name transportOptionDelete
-option-value
<option-value>
--config
command and the -operation
option that has the set
argument.httpTimeout
setting to 10 seconds:wp-toolkit --config -operation set -option-name httpTimeout -option-value 10
-target-instance-id
<target-instance-id>
--copy-data
command.1
to the website with the ID 2:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2
-data-to-copy
all
| files
| db
--copy-data
command. Specifies what data to copy: files and database, files only, or database only.1
to the website with the ID 2:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -data-to-copy files
-files-replace-modified
yes
| no
--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.1
to the website with the ID 2 and prohibit overwriting files on the target with the files from the source that are older:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -files-replace-modified no
-files-remove-missing
yes
| no
--copy-data
command. When set to “yes”, it removes files existing on the target but absent from the source.1
to the website with the ID 2 and remove files existing on the target but absent from the source:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -files-remove-missing yes
-db-tables-copy-mode
default
| all
| new
| selected
--copy-data
command. Specifies which database tables will be copied:default
copies all tables except for the data ones (postmeta
, posts
, usermeta
, and users
).all
copies all tables of the source WordPress website (you can exclude certain tables with the -exclude-db-tables
option).new
copies tables that exist on the source WordPress website but are absent from the target WordPress site.selected
allows to select exact tables to copy. Requires the -db-tables
option.1
to the website with the ID 2 copying all database tables:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -db-tables-copy-mode all
-db-tables
--copy-data
command and the -db-tables-copy-mode
option that has the selected
value.1
to the website with the ID 2 copying the H7_posts
and H7_comments
database tables:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -db-tables-copy-mode selected -db-tables H7_posts,H7_users
-exclude-db-tables
--copy-data
command and the -db-tables-copy-mode
option that has the all
value.1
to the website with the ID 2 excluding the H7_posts
and H7_comments
database tables from copying:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -db-tables-copy-mode all -exclude-db-tables H7_posts,H7_users
-create-restore-point
yes
| no
--copy-data
command. Set to “yes” by default.1
to the website with the ID 2 and not to create a restore point:wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2 -create-restore-point no
-username
<username>
--install
command. Specifies the administrator username.ADMIN_PASSWORD
environment variable.example.com
naming the administrator “WP_admin”:wp-toolkit --install -domain-name example.com -username WP_admin
-auto-updates
true
| false
| minor
--install
command.example.com
turning on all (minor and major) automatic updates:wp-toolkit --install -domain-name example.com -auto-updates true
-plugins-auto-updates
true
| false
--install
command.example.com
turning on automatic updates of plugins:wp-toolkit --install -domain-name example.com -plugins-auto-updates true
-themes-auto-updates
true
| false
--install
command.example.com
turning on automatic updates of themes:wp-toolkit --install -domain-name example.com -themes-auto-updates true
WP-CLI
. This allows you to configure WordPress sites using global parameters.--skip-plugins=false
and --skip-themes=false
to WP-CLI
plugin and theme commands for them to resolve.WP-CLI
commands, including parameters and options, read the WP-CLI
Config documentation.WP-CLI
command in a WP Toolkit command if you separate it with a double hyphen, as follows:wp-toolkit --wp-cli -instance-id 1 -- plugins list --skip-plugins=false