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 Feb 15, 2026

WP Toolkit Command Line Interface (CLI)


معتبر برای نسخه‌های 92 تا آخرین نسخه

آخرین ویرایش: 6 ژوئن 2025


Overview

رابط خط فرمان WP Toolkit به مدیران اجازه می‌دهد نصب‌های وردپرس را مستقیماً از طریق SSH مدیریت کنند. این شامل نصب وردپرس، کلون کردن سایت‌ها، کپی داده‌ها، مدیریت افزونه‌ها و قالب‌ها، تغییر تنظیمات و موارد دیگر است.

برای اجرای API، ابتدا باید با کاربر root از طریق SSH به سرور متصل شوید.


wp-toolkit <command> [options]



دستورات WP Toolkit

--clear-cache

پاک کردن کش یک نصب وردپرس.

نیازمند: -instance-id یا -main-domain-id و -path


wp-toolkit --clear-cache -instance-id 1

--clear-wpt-cache

پاک کردن کش خود WP Toolkit.


wp-toolkit --clear-wpt-cache

--register

افزودن یک نصب وردپرس موجود به WP Toolkit.

نیازمند: -main-domain-id و -path


wp-toolkit --register -main-domain-id 1 -path httpdocs

--info

نمایش اطلاعات کامل یک نصب وردپرس.

نیازمند: -instance-id یا -main-domain-id و -path


wp-toolkit --info -instance-id 1

--config

مدیریت تنظیمات WP Toolkit.

نیازمند: -operation list | get | set | rollback


wp-toolkit --config -operation list

--wp-cli

اجرای دستورات WP-CLI روی یک نصب وردپرس.

نیازمند: -instance-id یا -main-domain-id و -path


wp-toolkit --wp-cli -instance-id 1 -- plugin list

--list

نمایش خلاصه‌ای از تمام نصب‌های وردپرس موجود روی سرور.


wp-toolkit --list

--help

نمایش راهنمای ابزار.


wp-toolkit --help

--install

نصب وردپرس روی یک دامنه.

نیازمند: -domain-name یا -main-domain-id


wp-toolkit --install -domain-name example.com

--clone

کلون کردن یک سایت وردپرسی به دامنه یا مسیر دیگر.

نیازمند: -source-instance-id و -target-domain-id یا -target-domain-name


wp-toolkit --clone -source-instance-id 1 -target-domain-id 2

--copy-data

کپی فایل‌ها و/یا دیتابیس از یک سایت وردپرسی به سایت دیگر.

نیازمند: -source-instance-id و -target-instance-id


wp-toolkit --copy-data -source-instance-id 1 -target-instance-id 2

--detach

جدا کردن یک نصب وردپرس از WP Toolkit.


wp-toolkit --detach -instance-id 1

--languages

نمایش زبان‌های قابل نصب برای نسخهٔ خاصی از وردپرس.


wp-toolkit --languages -version 4.9.8 -format json

--sets

مدیریت مجموعه‌های افزونه و قالب.


wp-toolkit --sets -operation list

--plugins

مدیریت افزونه‌های آپلود شده.


wp-toolkit --plugins -operation list-custom

--themes

مدیریت قالب‌های آپلود شده.


wp-toolkit --themes -operation remove -id 1 -version 1.4

--smart-update

فعال یا غیرفعال کردن Smart Updates برای یک سایت.


wp-toolkit --smart-update -instance-id 1

--versions

نمایش نسخه‌های قابل نصب وردپرس.


wp-toolkit --versions



گزینه‌های WP Toolkit

WP Toolkit CLI از گزینه‌های گسترده‌ای برای نصب، کلون، کپی داده، مدیریت افزونه‌ها و قالب‌ها و پیکربندی تنظیمات پشتیبانی می‌کند.

نمونه‌ای از گزینه‌های مهم

  • -instance-id: شناسه نصب وردپرس
  • -main-domain-id: شناسه دامنه اصلی
  • -path: مسیر داخل Document Root
  • -plugins: نمایش تعداد افزونه‌ها
  • -themes: نمایش تعداد قالب‌ها
  • -format: raw | json
  • -domain-id: شناسه دامنه
  • -domain-name: نام دامنه
  • -operation: عملیات برای sets، config، plugins، themes
  • -site-title: عنوان سایت
  • -protocol: http | https
  • -db-name: نام دیتابیس
  • -db-user: کاربر دیتابیس
  • -table-prefix: پیشوند جداول
  • -language: زبان وردپرس
  • -version: نسخه وردپرس
  • -admin-email: ایمیل مدیر
  • -username: نام کاربری مدیر
  • -auto-updates: true | false | minor
  • -plugins-auto-updates: true | false
  • -themes-auto-updates: true | false



اجرای WP-CLI از طریق WP Toolkit

WP Toolkit می‌تواند دستورات WP-CLI را با استفاده از گزینه --wp-cli اجرا کند.

مثال:


wp-toolkit --wp-cli -instance-id 1 -- plugins list --skip-plugins=false

Conclusion

WP Toolkit CLI یک ابزار قدرتمند برای مدیریت خودکار و پیشرفتهٔ وردپرس در سرورهای cPanel & WHM است. با استفاده از این دستورات و گزینه‌ها، مدیران می‌توانند سایت‌های وردپرسی را در مقیاس بالا و با سرعت و دقت مدیریت کنند.


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

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

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