CLI Reference
All Rudel operations are available through WP-CLI under the wp rudel namespace.
Custom command name
The CLI command name can be changed by defining RUDEL_CLI_COMMAND in your wp-config.php before the plugin loads:
define( 'RUDEL_CLI_COMMAND', 'sandbox' );This changes all commands from wp rudel ... to wp sandbox .... Useful for white-label distributions or when rudel conflicts with another command.
Only the WP-CLI command name is affected. Internal identifiers like the rudel_sandbox cookie and X-Rudel-Sandbox header remain unchanged. The URL path prefix can be configured separately via RUDEL_PATH_PREFIX.
Sandbox commands
wp rudel create
Create a new sandbox.
wp rudel create [--name=<name>] [--github=<repo>] [--engine=<engine>] [--template=<template>] [--clone-db] [--clone-themes] [--clone-plugins] [--clone-uploads] [--clone-all] [--clone-from=<id>]| Option | Description |
|---|---|
--name=<name> | Human-readable name. Auto-generated from --github repo or random if omitted. |
--github=<repo> | GitHub repository (owner/repo). Creates a branch and downloads files. |
--engine=<engine> | Database engine: mysql (default), sqlite, or subsite (multisite only) |
--template=<template> | Template to use (default: blank) |
--clone-db | Clone the host database into the sandbox |
--clone-themes | Copy host themes into the sandbox |
--clone-plugins | Copy host plugins into the sandbox |
--clone-uploads | Copy host uploads into the sandbox |
--clone-all | Clone everything (database, themes, plugins, uploads) |
--clone-from=<id> | Clone from an existing sandbox |
# Blank sandbox (name auto-generated)
wp rudel create
# Named sandbox
wp rudel create --name="my-sandbox"
# GitHub worktree: creates branch, downloads repo
wp rudel create --github=inline0/my-theme
# Full clone of host
wp rudel create --clone-all
# SQLite engine
wp rudel create --engine=sqlite
# Multisite sub-site (requires multisite host)
wp rudel create --engine=subsitewp rudel list
List all sandboxes.
wp rudel list [--format=<format>]| Option | Description |
|---|---|
--format=<format> | Output format: table (default), json, csv, yaml, count |
wp rudel info
Show sandbox details.
wp rudel info <id> [--format=<format>]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--format=<format> | Output format: table (default), json, yaml |
wp rudel destroy
Delete a sandbox permanently.
wp rudel destroy <id> [--force]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--force | Skip confirmation prompt |
wp rudel status
Show Rudel status and configuration.
wp rudel statuswp rudel promote
Replace the host site with a sandbox's state.
wp rudel promote <id> [--force] [--backup-dir=<path>]| Option | Description |
|---|---|
<id> | Sandbox ID to promote (required) |
--force | Skip confirmation prompt |
--backup-dir=<path> | Custom directory for the host backup |
wp rudel logs
View a sandbox's error log.
wp rudel logs <id> [--lines=<lines>] [--follow] [--clear]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--lines=<lines> | Number of lines to show from the end (default: 50) |
--follow | Watch for new entries in real time (like tail -f) |
--clear | Clear the log file |
wp rudel snapshot
Create a point-in-time snapshot of a sandbox.
wp rudel snapshot <id> --name=<name>| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--name=<name> | Snapshot name (required) |
wp rudel restore
Restore a sandbox from a snapshot.
wp rudel restore <id> --snapshot=<name> [--force]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--snapshot=<name> | Snapshot name to restore from (required) |
--force | Skip confirmation prompt |
wp rudel export
Export a sandbox as a zip archive.
wp rudel export <id> --output=<path>| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--output=<path> | Output path for the zip file (required) |
wp rudel import
Import a sandbox from a zip archive.
wp rudel import <file> --name=<name>| Option | Description |
|---|---|
<file> | Path to the zip file (required) |
--name=<name> | Name for the imported sandbox (required) |
wp rudel cleanup
Clean up expired or merged sandboxes.
wp rudel cleanup [--dry-run] [--max-age-days=<days>] [--merged]| Option | Description |
|---|---|
--dry-run | Show what would be removed without deleting |
--max-age-days=<days> | Override the configured max age in days |
--merged | Remove sandboxes whose git branches have been merged into main |
GitHub commands
wp rudel push
Push sandbox file changes to a GitHub branch. No git binary required.
wp rudel push <id> [--github=<repo>] [--message=<message>] [--dir=<dir>]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--github=<repo> | GitHub repository (owner/repo). Remembered after first use. |
--message=<message> | Commit message (default: "Update from Rudel sandbox") |
--dir=<dir> | Subdirectory within wp-content to push (e.g. themes/my-theme) |
Requires RUDEL_GITHUB_TOKEN to be defined in wp-config.php.
wp rudel pr
Create a GitHub pull request from a sandbox branch.
wp rudel pr <id> [--github=<repo>] [--title=<title>] [--body=<body>]| Option | Description |
|---|---|
<id> | Sandbox ID (required) |
--github=<repo> | GitHub repository. Uses stored repo from previous push if omitted. |
--title=<title> | PR title (defaults to sandbox name) |
--body=<body> | PR description |
Template commands
wp rudel template save
Save a sandbox as a reusable template.
wp rudel template save <id> --name=<name> [--description=<description>]| Option | Description |
|---|---|
<id> | Sandbox ID to save (required) |
--name=<name> | Template name (required) |
--description=<description> | Optional description |
wp rudel template list
List all templates.
wp rudel template list [--format=<format>]| Option | Description |
|---|---|
--format=<format> | Output format: table (default), json, csv, yaml, count |
wp rudel template delete
Delete a template.
wp rudel template delete <name> [--force]| Option | Description |
|---|---|
<name> | Template name (required) |
--force | Skip confirmation prompt |
Browser endpoints
Exit sandbox
?adminExitAppend ?adminExit to any URL to clear the rudel_sandbox cookie and redirect to the host homepage. Use this to switch back from a sandbox to the host site in the browser.