Introduction
Rudel is a WordPress plugin that creates fully isolated sandbox environments within an existing WordPress installation. Each sandbox runs its own SQLite database, has its own wp-content directory, and is fully scoped for WP-CLI.
Why Rudel?
WordPress development and AI-assisted coding lack a safe, disposable environment:
- Testing plugin or theme changes on a live site is risky.
- Setting up local dev environments (Docker, MAMP, Valet) is slow and heavy.
- MySQL-based staging environments are complex to provision and tear down.
- AI coding agents have no safe, scoped WordPress context to operate in.
- There is no self-hosted, single-plugin solution for disposable WordPress environments.
How it works
Rudel installs as a standard WordPress plugin. On activation, it adds a single require line to wp-config.php that loads a bootstrap file before WordPress boots. This bootstrap file detects sandbox context from the incoming request and sets all relevant WordPress constants (database path, content directory, plugin directory, uploads) to point to an isolated sandbox folder.
Each sandbox is a self-contained directory:
/sandboxes/sandbox-{id}/
├── .rudel.json # Sandbox metadata (source of truth)
├── wp-cli.yml # Auto-scopes all WP-CLI commands
├── bootstrap.php # Sets WP constants for this sandbox
├── wordpress.db # SQLite database (the entire DB)
├── CLAUDE.md # Agent instructions (optional)
├── wp-content/
│ ├── db.php # SQLite drop-in
│ ├── themes/ # Sandbox-specific themes
│ ├── plugins/ # Sandbox-specific plugins
│ ├── uploads/ # Isolated media
│ └── mu-plugins/ # Sandbox mu-plugins
├── snapshots/ # Named snapshots (created on demand)
└── tmp/ # Sandbox temp directoryWordPress core files (wp-includes/, wp-admin/, root files) are always shared via the host installation. Sandboxes only isolate the content layer.
Key features
- Instant creation: Sandboxes are created in under 2 seconds.
- Full isolation: Each sandbox gets its own SQLite database and wp-content directory.
- Database cloning: Clone your host MySQL database into a sandbox SQLite database.
- Snapshots: Point-in-time snapshots with instant restore.
- Templates: Save sandboxes as reusable templates for rapid provisioning.
- Export/Import: Package sandboxes as zip archives for sharing.
- Auto cleanup: Configurable expiry and automatic removal of stale sandboxes.
- WP-CLI integration: Full command-line interface for all operations.
- Agent-ready: Built for AI coding agents like Claude Code, with scoped WP-CLI and
CLAUDE.mdsupport.
Requirements
- PHP 8.0+
- WordPress 6.4+
- PDO SQLite PHP extension (built into most PHP installations)
- Write access to
wp-config.php