Promote to Host
When you're happy with the state of a sandbox, you can promote it to replace the host site entirely. This copies the sandbox's database and wp-content to the host, rewriting all URLs and table prefixes in the process.
How it works
wp rudel promote my-sandbox-a1b2Rudel will ask for confirmation before proceeding. The promotion process:
- Backs up all host database tables to safety-prefixed copies.
- Backs up the host's wp-content directory.
- Copies the sandbox's database tables to the host prefix, rewriting URLs from the sandbox path back to the host URL.
- Syncs the sandbox's themes, plugins, and uploads to the host wp-content.
The sandbox itself is left intact after promotion. You can destroy it when you're ready.
Backup and safety
A backup is always created before the host is modified. The output shows where it's stored:
Success: Sandbox promoted to host.
Backup: /path/to/sandboxes/_backups/20260327_143022
Backup prefix: rudel_backup_20260327_143022_
Tables copied: 12The backup includes a copy of every host table (stored as rudel_backup_{timestamp}_posts, rudel_backup_{timestamp}_options, etc.) and a full copy of the host's wp-content directory. If something goes wrong, the data is still there.
You can specify a custom backup location:
wp rudel promote my-sandbox-a1b2 --backup-dir=/tmp/my-backupSkipping confirmation
For scripted use or CI, pass --force to skip the confirmation prompt:
wp rudel promote my-sandbox-a1b2 --forceEngine support
Promote works with both MySQL and SQLite sandboxes. MySQL sandboxes copy tables directly within the same database. SQLite sandboxes read from the SQLite file and write into the host's MySQL tables.
Subsite-engine sandboxes cannot be promoted since they already share the host's multisite network.
Typical workflows
Agent-driven development. Let an AI coding agent work in a sandbox. Review the changes, then promote when satisfied.
Staging to production. Build and test in a sandbox, promote to make it live.
Safe experimentation. Try a risky migration or plugin update in a sandbox. If it works, promote. If not, destroy and start fresh.