WP-CLI command reference
WP-CLI is the command-line interface (CLI) for WordPress. It is installed on every TurboStack host as wp, so you can manage a site over SSH instead of clicking through the admin. This makes it fast for updates, bulk changes and scripting across many sites. This page groups the common commands by task. For where the files live and the cron setup, see WordPress reference.
How to run it
Connect over SSH, change into the WordPress root, then run wp:
cd ~/public_html
wp <command>
Here ~ is your system user's home directory (for example /var/www/prod/), and ~/public_html is the WordPress root. WP-CLI reads wp-config.php from this directory, so always run it from there (or pass --path=/var/www/prod/public_html).
Run wp help for the full command list, or wp help <command> for the options and examples of a single command.
Core
Plugins
Themes
Users
Database
Content and options
Cron
For reliable scheduling, replace the default web-triggered wp-cron with a real cron job that calls WP-CLI - see WordPress reference.
Cache and search-replace
Warning
Always test wp search-replace with --dry-run first. It reports how many rows would change without writing anything. This matters most when moving a site between domains (for example dev.example.com to example.com).
Note
wp cache flush clears WordPress's own object cache. The platform caches (Redis and Varnish) are separate - clear those with the TurboStack command-line tool (tscli redis clear, tscli varnish clear). See TurboStack CLI.
WP-CLI itself
Related
- WordPress reference
- Deploy WordPress on TurboStack
- WordPress best practices
- Troubleshooting WordPress
- Connect over SSH