wp_cli_run
Execute WP-CLI commands on WordPress sites via SSH. Destructive operations require a confirmation flow to prevent unintended changes.
Instructions
Execute an arbitrary wp-cli command on a site via SSH. The wp prefix and --path are added automatically — pass only the args (e.g. 'post list --post_type=page'). Destructive commands (delete, drop, search-replace without --dry-run, plugin deactivate/uninstall) require a two-call confirmation flow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | ||
| args | Yes | WP-CLI args without leading 'wp', e.g. 'post list --post_type=page' | |
| timeout_ms | No | ||
| confirmation | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| command | Yes | ||
| stdout | No | ||
| stderr | No | ||
| exit_code | No | ||
| duration_ms | No | ||
| destructive_pattern_detected | No | ||
| confirmation_token | No | ||
| expires_in_seconds | No |