~3 min read • Updated Feb 15, 2026
WP Toolkit Command Line Interface (CLI)
Valid for versions 92 through the latest version
Last modified: June 6, 2025
Overview
The WP Toolkit CLI allows administrators to manage WordPress installations directly from the command line. This includes installing WordPress, cloning sites, copying data, managing plugins and themes, configuring settings, and more.
To run the API, connect to your server via SSH as the root user:
wp-toolkit <command> [options]
WP Toolkit Commands
--clear-cache
Clears the cache of a selected WordPress installation.
Requires: -instance-id | -main-domain-id AND -path
wp-toolkit --clear-cache -instance-id 1
--clear-wpt-cache
Clears the WP Toolkit cache.
wp-toolkit --clear-wpt-cache
--register
Adds an existing WordPress installation to WP Toolkit.
Requires: -main-domain-id AND -path
wp-toolkit --register -main-domain-id 1 -path httpdocs
--info
Displays detailed information about a WordPress installation.
Requires: -instance-id | -main-domain-id AND -path
wp-toolkit --info -instance-id 1
--config
Manages WP Toolkit settings.
Requires: -operation list|get|set|rollback
wp-toolkit --config -operation list
--wp-cli
Executes WP-CLI commands on a WordPress installation.
Requires: -instance-id | -main-domain-id AND -path
wp-toolkit --wp-cli -instance-id 1 -- plugin list
--list
Displays a brief overview of all WordPress installations.
wp-toolkit --list
--help
Displays help information.
wp-toolkit --help
--install
Installs WordPress on a domain.
Requires: -domain-name OR -main-domain-id
wp-toolkit --install -domain-name example.com
--clone
Clones a WordPress installation to another domain or subdirectory.
Requires: -source-instance-id AND -target-domain-id | -target-domain-name
wp-toolkit --clone -source-instance-id 1 -target-domain-id 2
--copy-data
Copies files and/or database from one WordPress installation to another.
Requires: -source-instance-id AND -target-instance-id
wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2
--detach
Detaches a WordPress installation from WP Toolkit.
wp-toolkit --detach -instance-id 1
--languages
Displays available languages for a specific WordPress version.
wp-toolkit --languages -version 4.9.8 -format json
--sets
Manages plugin and theme sets.
wp-toolkit --sets -operation list
--plugins
Manages uploaded plugins.
wp-toolkit --plugins -operation list-custom
--themes
Manages uploaded themes.
wp-toolkit --themes -operation remove -id 1 -version 1.4
--smart-update
Enables or disables Smart Updates for a WordPress installation.
wp-toolkit --smart-update -instance-id 1
--versions
Displays available WordPress versions.
wp-toolkit --versions
WP Toolkit Options
The WP Toolkit CLI supports a wide range of options for installation, cloning, copying data, managing plugins/themes, and configuring settings.
Examples of Common Options
- -instance-id: WordPress installation ID
- -main-domain-id: Main domain ID
- -path: Path relative to document root
- -plugins: Show plugin count in list
- -themes: Show theme count in list
- -format: raw | json
- -domain-id: Domain ID
- -domain-name: Domain name
- -operation: Operation for sets, config, plugins, themes
- -site-title: WordPress site title
- -protocol: http | https
- -db-name: Database name
- -db-user: Database user
- -table-prefix: Table prefix
- -language: WordPress locale
- -version: WordPress version
- -admin-email: Admin email
- -username: Admin username
- -auto-updates: true | false | minor
- -plugins-auto-updates: true | false
- -themes-auto-updates: true | false
WP-CLI Commands via WP Toolkit
WP Toolkit can proxy WP-CLI commands using the --wp-cli flag.
Example:
wp-toolkit --wp-cli -instance-id 1 -- plugins list --skip-plugins=false
Conclusion
The WP Toolkit CLI provides powerful automation and management capabilities for WordPress installations on cPanel & WHM servers. With its extensive command set and flexible options, administrators can efficiently manage WordPress sites at scale.
Written & researched by Dr. Shahin Siami