WP Staging CLI is built to be driven by other programs. Add --json and a command answers with stable, machine-readable data instead of terminal text — the same data powers the WP Staging Desktop app.
JSON Everywhere
wpstaging list --json
wpstaging status mysite.local --jsonThe site list carries everything a script needs: hostnames, status, PHP and WordPress versions, container names, the WordPress path inside the container, and a fresh magic login link per site.
Paginate Large Lists
Long lists are paginated so a parser never chokes. The default page holds 100 items:
wpstaging list --json --page=2 --page-size=25See More With JSON
wpstaging sync-status --jsonreports the file-sync state of a fast-mode site.- The update notice in JSON output carries the current and latest version as separate fields.
wpstaging list --filter=shop --filter=status:stoppednarrows output by any repeated search term — and works with--json.
Deterministic Sites for CI and AI Agents
Because add takes a version and a backup URL, a pipeline — or an AI coding agent — can create an identical local copy of a client site, work in it, and throw it away:
wpstaging add agent-run-a.local --from=https://example.com/backup.wpstg --php=8.3
wpstaging add agent-run-b.local --from=https://example.com/backup.wpstg --php=8.3
wpstaging wp agent-run-a.local plugin list --format=jsonCommands exit non-zero on failure, so a script or pipeline notices a broken restore instead of continuing quietly.
Next Steps
- Run WP-CLI Commands on Local WordPress Sites – WP-CLI inside the site container
- Create a Local Copy of Your Site – what the CLI is built for