WP Toolkit Command Line Interface (CLI) – Complete Guide

This article provides a full reference for all WP Toolkit CLI commands and options available in cPanel & WHM. It explains how to run commands, manage WordPress installations, configure settings, clone sites, copy data, manage plugins and themes, and control WP Toolkit behavior using command-line operations.

wp-toolkit commandsWordPress command line cPanelWP Toolkit CLI

~3 min read · Updated Nov 4, 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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

How to Move All cPanel Accounts from One Server to Another

Migrate all cPanel accounts, service configurations, SSL certificates and the main IP from an old source server to a new target server, step by step.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue