Skip to content

Rudel

Request-selected WordPress overlay environments for sandboxes.

Terminal
composer require rudel/rudel

Latest release v0.10.0 GPL-2.0-or-later WordPress 6.4+ and PHP 8.2+

In practice

Create a sandbox from the host site, then point WP-CLI or an HTTP request at it.

Create a sandbox and route into it

wp rudel create clones the host tables under a new prefix, copies the theme into the sandbox directory and prints the sandbox ID.

Pass that ID in RUDEL_ENVIRONMENT for WP-CLI, or in the X-Rudel-Environment header or rudel_environment cookie for HTTP. The PHP API creates the same sandbox with lifecycle metadata.

Terminal
wp rudel create --name=alpha --theme=twentytwentyfour
RUDEL_ENVIRONMENT=alpha-1234 wp option get siteurl
curl -H 'X-Rudel-Environment: alpha-1234' http://localhost:8000/

Sandboxes

Disposable overlay environments for development, testing, and AI agents.

Request Selection

Route a request into a sandbox with an X-Rudel-Environment header, a rudel_environment cookie or RUDEL_ENVIRONMENT in WP-CLI. Selection is by sandbox id alone, without authentication.

Overlay Runtime

Activation adds a bootstrap line to wp-config.php. Each sandbox then gets cloned tables under its own prefix and a copy of the active theme; WordPress core, plugin files and uploads stay shared.

Git Worktrees

Built-in PHP-native Git clone, push, and worktree flows with no host git binary required.

Snapshots

Named recovery points that copy the tables and managed theme files of a sandbox. Create and restore them from WP-CLI or PHP.

Request Isolation

Per-request table prefixes, theme roots, temp directory, object cache key salt and email blocking.

WP-CLI & PHP API

wp rudel commands and Rudel\Rudel static methods create, list, update, snapshot, restore and destroy sandboxes.

Agent Ready

Gives coding agents a disposable WordPress copy, with WP-CLI scoped by RUDEL_ENVIRONMENT and outbound email blocked.

Why Rudel

One install, many sandboxes

Rudel runs inside a normal WordPress installation, without multisite and without a second WordPress install. The host site keeps serving its own data to every request that does not name a sandbox.

Copies the tables and one theme

A sandbox gets a copy of the host tables, users included, under its own prefix and a copy of the active theme, plus its parent for a child theme. WordPress core, plugin files and uploads stay on the host.

Sandboxes that expire

Give a sandbox an owner, labels, a purpose and a TTL in days. An hourly WP-Cron job removes expired sandboxes and skips the ones marked protected.

Safe to preview

Sandbox requests block outbound email and log each blocked message. Unless wp-config.php sets its own, the object cache key salt is derived from the sandbox ID, so persistent caches keep host and sandbox keys apart.

Compared with

Rudel works inside the site you already run. These tools cover neighbouring needs.

Rudel compared with other tools
WordPress Multisite Good atRuns a network of virtual sites on one set of core files, with shared plugins and themes, and separate database tables and upload directories for each site. Difference with RudelRudel does not need multisite. A sandbox is a copy of the existing site's tables and active theme, selected per request by a header, a cookie or a WP-CLI environment variable.
wp-env Good atSets up a local WordPress site with Docker for building and testing plugins and themes, without additional configuration. Difference with RudelRudel needs no second WordPress install. It creates sandboxes from the content of the site you already run, and their tables live in the same MySQL database as the host. It does not give a sandbox its own PHP runtime or database server.
WordPress Playground Good atRuns WordPress client-side in WebAssembly, with no backend, isolated to the browser and with no persistent side effects outside it. Difference with RudelRudel runs on the server next to a real site and its MySQL database. A sandbox starts from that site's current content and is reachable from WP-CLI and from any HTTP client.

Questions and answers

Short answers from the Rudel documentation.

Install the plugin, create a sandbox from your own site and send your first request into it with the getting started guide.