Staging
import { Badge, Aside } from ‘@astrojs/starlight/components’;
Staging tools let AI agents copy environments, test changes safely, and gate live pushes behind human approval.
wp_get_staging_info
Section titled “wp_get_staging_info”Detects the hosting provider and lists available environments. Call this first — it returns the environment IDs needed by all other staging tools.
// No parameters required{}Returns: Provider name, environment list (id, name, type, url).
wp_push_to_staging
Section titled “wp_push_to_staging”Copies live → staging. Safe — overwrites staging only, never touches production.
| Parameter | Type | Required | Description |
|---|---|---|---|
source | string | ✓ | Live environment ID (from wp_get_staging_info) |
destination | string | ✓ | Staging environment ID |
include_db | boolean | — | Include database (default: true) |
include_files | boolean | — | Include media files (default: true) |
On async hosts (Kinsta), returns operation_id — poll with wp_get_staging_status.
wp_push_to_live
Section titled “wp_push_to_live”Requests a staging → live push. Does not push immediately. Creates a pending approval request and returns an approval_id. A human operator must approve and apply it.
| Parameter | Type | Required | Description |
|---|---|---|---|
source | string | ✓ | Staging environment ID |
destination | string | ✓ | Live environment ID |
include_db | boolean | — | Include database (default: true) |
include_files | boolean | — | Include media (default: true) |
reason | string | ✓ | Describe what changed and why it’s ready |
wp_get_staging_status
Section titled “wp_get_staging_status”Polls the status of an async push operation.
| Parameter | Type | Required | Description |
|---|---|---|---|
operation_id | string | ✓ | ID returned by a push endpoint |
Supported hosts
Section titled “Supported hosts”| Host | API type | Notes |
|---|---|---|
| WP Engine | REST API | Configure key in MCPWP → Integrations |
| Kinsta | REST API | Async push — poll wp_get_staging_status |
| Pressable | REST API | Configure key in MCPWP → Integrations |
| Generic | WP-CLI | Fallback for other hosts |
- Install MCPWP Pro
- Go to WP Admin → MCPWP → Integrations
- Add your hosting provider credentials (
wpengine_staging,kinsta_staging, orpressable_staging) - Ask an agent:
"What staging environments do I have?"
Typical workflow
Section titled “Typical workflow”Agent: wp_get_staging_info→ Returns: env IDs for live + staging
Agent: wp_push_to_staging (live → staging)→ Staging now mirrors live
[Make changes on staging]
Agent: wp_push_to_live (staging → live, reason: "Updated homepage hero copy")→ Returns: approval_id