Rudel

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> [--engine=<engine>] [--template=<template>] [--clone-db] [--clone-themes] [--clone-plugins] [--clone-uploads] [--clone-all] [--clone-from=<id>]
OptionDescription
--name=<name>Human-readable name for the sandbox (required)
--engine=<engine>Database engine: mysql (default), sqlite, or subsite (multisite only)
--template=<template>Template to use (default: blank)
--clone-dbClone the host database into the sandbox
--clone-themesCopy host themes into the sandbox
--clone-pluginsCopy host plugins into the sandbox
--clone-uploadsCopy host uploads into the sandbox
--clone-allClone everything (database, themes, plugins, uploads)
--clone-from=<id>Clone from an existing sandbox
# Blank sandbox
wp rudel create --name="my-sandbox"

# Full clone of host
wp rudel create --name="full-clone" --clone-all

# Clone database only
wp rudel create --name="db-only" --clone-db

# Clone from existing sandbox
wp rudel create --name="copy" --clone-from=my-sandbox-a1b2

# Create from template
wp rudel create --name="from-template" --template=starter

# SQLite engine
wp rudel create --name="portable" --engine=sqlite

# Multisite sub-site (requires multisite host)
wp rudel create --name="subsite-sandbox" --engine=subsite

wp rudel list

List all sandboxes.

wp rudel list [--format=<format>]
OptionDescription
--format=<format>Output format: table (default), json, csv, yaml, count

wp rudel info

Show sandbox details.

wp rudel info <id> [--format=<format>]
OptionDescription
<id>Sandbox ID (required)
--format=<format>Output format: table (default), json, yaml

wp rudel destroy

Delete a sandbox permanently.

wp rudel destroy <id> [--force]
OptionDescription
<id>Sandbox ID (required)
--forceSkip confirmation prompt

wp rudel status

Show Rudel status and configuration.

wp rudel status

wp rudel promote

Replace the host site with a sandbox's state.

wp rudel promote <id> [--force] [--backup-dir=<path>]
OptionDescription
<id>Sandbox ID to promote (required)
--forceSkip 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]
OptionDescription
<id>Sandbox ID (required)
--lines=<lines>Number of lines to show from the end (default: 50)
--followWatch for new entries in real time (like tail -f)
--clearClear the log file

wp rudel snapshot

Create a point-in-time snapshot of a sandbox.

wp rudel snapshot <id> --name=<name>
OptionDescription
<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]
OptionDescription
<id>Sandbox ID (required)
--snapshot=<name>Snapshot name to restore from (required)
--forceSkip confirmation prompt

wp rudel export

Export a sandbox as a zip archive.

wp rudel export <id> --output=<path>
OptionDescription
<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>
OptionDescription
<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]
OptionDescription
--dry-runShow what would be removed without deleting
--max-age-days=<days>Override the configured max age in days
--mergedRemove 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>]
OptionDescription
<id>Sandbox ID (required)
--github=<repo>GitHub repository in owner/repo format (required)
--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>]
OptionDescription
<id>Sandbox ID (required)
--github=<repo>GitHub repository in owner/repo format (required)
--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>]
OptionDescription
<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>]
OptionDescription
--format=<format>Output format: table (default), json, csv, yaml, count

wp rudel template delete

Delete a template.

wp rudel template delete <name> [--force]
OptionDescription
<name>Template name (required)
--forceSkip confirmation prompt

Browser endpoints

Exit sandbox

?adminExit

Append ?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.

On this page