WordPress Sandbox, an experimental project that uses WebAssembly (WASM) to run WordPress in the browser without a PHP server, has been chugging along steadily since Automattic-sponsored core contributor Adam Zieliński introduced it earlier this year in September.
Zieliński published three new updates to Twitter this week, demonstrating the project’s potential to provide an in-browser IDE for plugin development along with a quick way to spin up a test environment for themes and plugins.
In the first example, he shows how the project could be used to test-drive themes from WordPress’ Themes Directory right in the browser. Clicking the demo URL will launch a site with the Pendant theme active, but the theme can be changed to another from the directory by appending a different theme name to the end of the URL. All your changes made on the demo are private and disappear after a page refresh. With a few improvements, this could be transformative for previewing themes on WordPress.org.
Zieliński also showed WordPress Sandbox’s potential for test-driving plugins directly in the browser. The example uses CoBlocks but can be changed to any other plugin from the directory by replacing the plugin name. Having this available to WordPress users would greatly speed up the plugin selection process in cases where it’s not clear if a plugin will do what you hope it will do. It would also be handy if you could append multiple plugin slugs to the URL to install more than one.
The most recent demo is a video showing how the project can be used to create an in-browser IDE for plugin development, where changes are displayed live.
For more examples of WordPress Sandbox’s capabilities, check out the quick showcase Zieliński built and play around with a live in-browser WordPress instance to see the site updated instantly as you code.