WordPress Playground: Running WordPress Through PHP WebAssembly
Run WordPress in the browser via WebAssembly PHP
At a glance
- What is it?
- WordPress Playground runs WordPress and PHP in a browser through WebAssembly, with an iframe client and a CLI for isolated local development. It is useful for zero-setup experimentation, but the README explicitly treats iframe embedding as experimental.
- Who is it for?
- Adopt WordPress Playground when you need an isolated WordPress environment for demonstrations, plugin development, or browser-based experiments. Do not treat the experimental iframe interface as a stable production integration.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 21, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why WordPress Playground Moves Beyond a PHP Server
WordPress Playground addresses the setup cost of obtaining a working WordPress environment. WordPress normally needs a PHP server, and conventional local or hosted environments also require configuration, database setup, and filesystem decisions. Playground places an experimental WordPress installation in the browser and runs PHP through WebAssembly, removing the need for a separate PHP server in the documented browser use case.
The intended users are learners who want to inspect WordPress behavior, plugin or theme authors who need a disposable workspace, and contributors building JavaScript applications that expose WordPress interactively. The repository also supports developers who want to compile PHP into WebAssembly targets for web or Node.js. This is an application platform as well as a collection of libraries. The README documents a live demo, a browser client, an iframe integration, and a separate command-line package.
That scope comes with a clear qualification. The iframe route is explicitly described as experimental and liable to break or change without warning. Playground is therefore a poor default for an organization that requires a documented, stable production hosting contract. It is more appropriate for experimentation, education, development fixtures, and embedded demonstrations where isolation and rapid startup matter more than conventional server administration.
How the Browser Client Connects PHP WebAssembly to WordPress
The documented browser flow has three visible pieces: an `iframe`, a Playground client loaded as a JavaScript module, and a blueprint passed to `startPlaygroundWeb`. The iframe supplies the isolated document in which the client-side WordPress instance appears. The client receives `remoteUrl`, which points to `https://playground.wordpress.net/remote.html`, and the blueprint describes the landing page, preferred runtime versions, and ordered setup steps.
The blueprint requests WordPress at `/wp-admin/`, selects PHP `8.0`, and sets WordPress to `latest`. It then defines a `login` step for the demonstration administrator and an `installPlugin` step that installs the WordPress.org plugin identified by the slug `friends`. This is a declarative setup path rather than a sequence of conventional shell commands. It shows how an application can describe important environment state before interacting with WordPress.
After startup, `client.run()` sends PHP code into the running environment. The example loads `/wordpress/wp-load.php` with `require_once`, calls `get_posts()`, and returns a post title as response text. The in-page WordPress interface and programmatic PHP execution are connected through the same Playground client. The README notes that `wp-load.php` is needed only when direct WordPress interaction is required, which separates general PHP execution from WordPress API access.
The example also makes an architectural choice worth noticing. It imports the client from `https://playground.wordpress.net/client/index.js`, while the iframe loads the Playground remote page. A project therefore needs to account for browser module loading, cross-document communication, and the availability of the remote service. The README does not document offline loading for this exact browser example, nor does it promise that the hosted client URL will remain unchanged.
Starting the Playground CLI with a Mounted Plugin or Theme
For plugin and theme work, the shortest documented first use is the `@wp-playground/cli` package. Run it from the directory containing the project. The `--auto-mount` option asks the CLI to detect whether that directory is a plugin or theme and mount it into the virtual WordPress environment.
cd my-plugin-or-theme-directory
npx @wp-playground/cli server --auto-mountThe README describes this as an isolated WordPress instance for testing the current directory. That design is useful for repeated checks because it avoids first configuring a conventional local web stack. It also changes the failure surface: the expected project shape, mount behavior, and virtual WordPress environment now matter. A failure to start cannot automatically be attributed to WordPress code without checking whether auto-detection found the expected plugin or theme structure.
The package is not limited to automatic mounting. The README points to its package documentation for manual mounts and blueprint integration. It also says that the CLI can switch PHP and WordPress versions through flags, but the main repository README does not provide those advanced flag names. The safe first workflow is consequently the exact auto-mount command above. Version-switching examples should come from the `@wp-playground/cli` documentation rather than guessed.
Running the Playground Repository for Client-Side Development
Contributors can run the website itself. The README recommends a shallow, single-branch clone with submodules, followed by the repository's standard npm scripts. The project declares `[email protected]` as its package manager in `package.json`, and `.nvmrc` is present in the repository, although the README does not state the Node.js version selected there.
git clone -b trunk --single-branch --depth 1 --recurse-submodules https://github.com/WordPress/wordpress-playground.git
cd wordpress-playground
npm install
npm run devThe documented result is a client-side WordPress page at `http://127.0.0.1:5400/`. TypeScript changes are live-reloaded. Changes to `Dockerfile` require a full rebuild, so editing container instructions without rebuilding can leave the running site on stale behavior.
This is a repository-development path, not the normal route for trying the hosted product. The live demo offers immediate browser access, while `npm run dev` builds and serves the website for contributors. The repository is an Nx and Lerna monorepo containing multiple packages and build targets, which means a full local setup is heavier than installing the small CLI package for one plugin directory.
The shallow clone is an explicit setup choice. It reduces the amount of repository history fetched, but it may not be appropriate for workflows that need older branches, tags, or a complete history. Submodules are included because the local build expects them. Contributors should treat the repository command as a development environment setup, not as the installation command for an application that embeds Playground in production.
The WebAssembly Build Surface and Its Constraints
The repository builds more than the demo website. Its scripts compile PHP releases for browser and Node.js targets, build bundled WordPress releases, construct the Playground client package, and build documentation. The README gives commands for PHP versions 7.0 through 8.4, including separate WebAssembly outputs for web and Node.js.
npx nx recompile-php:all php-wasm-web
npx nx recompile-php:all php-wasm-node
npx nx bundle-wordpress:all playground-wordpress-builds
npx nx build playground-clientDebug-oriented compilation can include DWARF debug information or source maps. The repository also exposes `examples/xdebug/`, but the README does not describe how to use that example, so its configuration and behavior should not be inferred. Likewise, the offline-testing command shown in the README is incomplete and cannot serve as a complete procedure.
The important boundary is that WebAssembly changes how PHP executes, not which WordPress extension assumptions are automatically safe. The README does not document production persistence, database durability across browser sessions, complete browser support, resource limits, or rollback behavior. Those omissions matter to evaluators. A browser instance can simplify setup while leaving unanswered questions about long-lived content, concurrent users, server integrations, and operational monitoring.
The build targets also expose a maintenance cost. Contributors may need to distinguish web PHP.wasm from Node.js PHP.wasm, rebuild WordPress bundles, and regenerate package output. The repository has separate scripts for web builds, JSPI builds, and Node.js builds. A change to runtime or packaging code can therefore require validation in more than one target rather than a single browser page.
Playground Compared with a Conventional WordPress Server
The closest alternative is a normal WordPress deployment backed by a PHP server and persistent storage. Its architecture follows the established web request path: the browser sends requests to the server, PHP loads WordPress, and configured storage preserves site data. Playground instead uses browser-side WebAssembly to execute PHP in a client-oriented environment, while its blueprint configures that environment programmatically.
That difference makes Playground quicker for disposable or interactive use. A JavaScript application can start a WordPress experience without asking a visitor to install PHP or prepare a database. The CLI also mounts plugin or theme work without a conventional server configuration. The README positions users, learners, extenders, and contributors as the beneficiaries of that access model.
The conventional server route is the clearer choice when the requirement is a durable production site. The README does not claim that Playground replaces standard WordPress hosting, and it does not document the operational controls expected from such a service. It also warns that iframe embedding may change without warning. The practical distinction is not simply old versus new. Playground minimizes setup for experimentation, while a PHP server provides the familiar route for persistent, service-oriented WordPress operation.
Release Cadence, GPL Terms, and Adoption Cost
The repository is not archived, and its last push was on 2026-10-17. The release history includes v3.1.58 on 2026-10-12, v3.1.57 on 2026-10-05, and v3.1.56 on 2026-09-28. Those dated records indicate recent repository activity, but they do not establish compatibility with every WordPress plugin, PHP extension, or production workload.
The root `package.json` identifies the repository license as `GPL-2.0-or-later`, while the repository listing states `GPL-2.0`. This distinction should be checked against the exact files and packages being distributed. GPL terms can affect how modified versions are conveyed, but this review does not provide legal advice. Consumers need to inspect the applicable `LICENSE` and package metadata before redistribution.
Upgrade cost includes more than downloading a new version. The iframe contract is experimental, blueprints can pin PHP and WordPress behavior, and plugin assumptions may change between WordPress versions or Playground releases. Repository contributors also face the cost of npm dependencies, submodules, Nx targets, WebAssembly builds, and browser debugging. The lightweight CLI has a different cost profile from compiling PHP or maintaining a full Playground integration.
A small integration can still create operational work if it depends on a hosted client, a blueprint, or a particular WordPress version. The README does not document a rollback procedure, service-level commitment, or production persistence model. Those omissions should remain adoption checks rather than assumptions.
Editorial conclusion
Adopt WordPress Playground when you need an isolated WordPress environment for demonstrations, plugin development, or browser-based experiments. Do not treat the experimental iframe interface as a stable production integration. Verify the relevant Playground client behavior, blueprint steps, PHP and WordPress versions, and persistence requirements before committing to a release.
Frequently asked questions
Does WordPress Playground require a PHP server?
The README describes WordPress Playground as running in the browser without a PHP server because PHP is executed through WebAssembly. The documented client and CLI paths are intended to provide a zero-setup WordPress environment.
How do I test a WordPress plugin or theme locally with WordPress Playground?
Run `@wp-playground/cli` from the plugin or theme directory with `--auto-mount`. The README says this flag detects and mounts the project into an isolated virtual WordPress environment.
Is embedding WordPress Playground in an iframe production-ready?
No stability promise is made. The README labels iframe embedding experimental and warns that it may break or change without warning.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/wordpress-wordpress-playground)Was this useful?