WordPress Playground, an experimental project that uses WebAssembly (WASM) to run WordPress in the browser, makes it possible for users to quickly test plugins and themes without having to set up a local development environment.
Ordinarily, testing a plugin or theme with Playground requires visiting playground.wordpress.net
, which will instantly create a real WordPress instance with admin access without having to install PHP, MySQL, or Apache. It runs inside the browser using a SQLite database. Adding a plugin or theme to the instance is as easy as appending the slug to the URL when creating the test site:
https://playground.wordpress.net/?plugin=gutenberg
https://playground.wordpress.net/?theme=lemmony-agency
A new Chrome browser extension, created by LUBUS, a development agency, makes this even easier by adding a “Playground” button to theme and plugin pages on WordPress.org. Users can fire up a sandbox instance to test drive a theme or plugin in just one click.
I tested the extension and it works as advertised. It’s a neat little shortcut for launching a Playground instance without having to remember the URL or get the plugin/theme’s slug to append to it. The video below shows a site created with a selected plugin installed in under 20 seconds.
Video
“We have been using Playground internally a lot for testing out plugins, and quick demos for internal or client meetings,” LUBUS founder Ajit Bohra said. “We often find a plugin or theme which we would like to test drive. It involves copying the slug of the theme or plugin and using them in the URL. To make this quick we thought of building and quick browser extension to add a button on wordpress.org to quickly launch a plugin or theme in the Playground.”
Bohra posted his process of creating the extension in a thread on X. He used the Plasmo framework, which offers a dedicated runtime for building browser extensions, taking the project from idea to built in approximately 30 minutes.
Bohra said the browser extension is currently a proof of concept that he would like to further extend with more settings based on feedback from users. He also hopes to collaborate with the Meta team in the future to see something like this added to the plugin and theme pages on WordPress.org so that users don’t have to rely on a browser extension.
The Chrome extension is called “Open in WordPress Playground” and is available to the public for free on the Chrome Web Store. The code is open source on GitHub and open for contribution.