Creating Sandboxes
Rudel offers several ways to create sandboxes, depending on how much of your host site you want to bring along.
Blank sandbox
Creates an empty sandbox with a fresh SQLite database and minimal wp-content:
wp rudel create --name="my-sandbox"This is the fastest option. The sandbox gets the default WordPress tables but no content, no themes beyond the default, and no plugins.
Clone everything
Clones the host MySQL database and all wp-content into the sandbox:
wp rudel create --name="full-clone" --clone-allThe --clone-all flag is equivalent to passing --clone-db --clone-themes --clone-plugins --clone-uploads together. The database cloner converts MySQL data to SQLite and rewrites URLs automatically.
Clone database only
Clones just the host database without any wp-content files:
wp rudel create --name="db-only" --clone-dbUseful when you want the host's posts, options, and users but plan to install themes and plugins fresh.
Selective cloning
Pick exactly what to clone:
# Clone themes and plugins, but not uploads or database
wp rudel create --name="themes-plugins" --clone-themes --clone-plugins
# Clone database and themes only
wp rudel create --name="db-themes" --clone-db --clone-themesAvailable flags:
| Flag | What it clones |
|---|---|
--clone-db | Host MySQL database to sandbox SQLite |
--clone-themes | Host themes directory |
--clone-plugins | Host plugins directory |
--clone-uploads | Host uploads directory |
--clone-all | All of the above |
Clone from an existing sandbox
Create a new sandbox by copying an existing one:
wp rudel create --name="copy" --clone-from=my-sandbox-a1b2This copies the source sandbox's SQLite database and wp-content directory into a new sandbox. The --clone-from flag is mutually exclusive with --clone-db, --clone-themes, --clone-plugins, --clone-uploads, and --clone-all.
Create from a template
Use a saved template as the starting point:
wp rudel create --name="from-template" --template=starterTemplates are pre-configured snapshots saved from existing sandboxes. See Templates for how to create and manage them.
What happens during creation
When you create a sandbox, Rudel:
- Generates a unique sandbox ID from the name (e.g.,
my-sandbox-a1b2). - Creates the sandbox directory with
wp-content,tmp, and subdirectories. - Copies or creates the SQLite database.
- Generates
wp-cli.ymlscoped to the sandbox. - Generates
bootstrap.phpwith the sandbox's WordPress constants. - Optionally clones content based on the flags provided.
- Writes
.rudel.jsonmetadata to the sandbox directory.
The sandbox is ready to use immediately after creation.