Skip to content

WP-CLI execution

New in v3.4.0. Free, ships disabled by default. Lets a connected agent run wp-cli commands directly, synchronously for quick lookups, or as a detached background job for long migrations and bulk tasks.

Runs a command synchronously and returns stdout, stderr, and the exit code. Runs in-process over the WP-CLI stdio transport, or via a configured wp binary over HTTP.

Input: command (required) — the command without the leading wp (e.g. "plugin list --format=json"). timeout — max seconds on the shell path, default 60, max 300.

Runs a command as a detached background job, for long migrations or bulk tasks, and returns a job id. Requires a configured wp base command. Poll it with get-wp-cli-job.

Input: command (required). timeout — advisory max seconds, default 900.

Returns a background job’s status (running / completed / failed), exit code, and captured stdout/stderr. Read-only.

Input: job_id (required).

Lists background jobs. Read-only.

All four are off until enabled on EMCP Tools → Tools. See Disabling tools. Given the blocklist still allows a wide range of wp-cli subcommands (plugin/theme management, user operations, cron, transients, and more), treat enabling these the same as granting shell-adjacent access, only turn them on for agents and sites you trust.