Loading...

WordPress Playground lets you run WordPress entirely in your browser

WordPress Playground lets you run WordPress entirely in your browser<br />
<b>Warning</b>:  Undefined array key /var/www/vhosts/lawyersinamerica.com/httpdocs/app/views/singleBlog/singleBlogView.php on line 59
">
Jul 2023

If you don't keep up with WordPress ecosystem news, you might not be aware of a cool new project called WordPress Playground. And I include myself in this group as I had never heard of WordPress Playground until the project page was submitted to Hacker News a few days ago.

But WordPress Playground is so neat that it deserves a quick explanation here. The idea is quite simple. Playground lets you run a WordPress instance directly from your web browser without having to mess around with a server -- no need to install PHP, MySQL or Apache.

You can try it out on playground.wordpress.net. In just a few seconds, you get a brand new WordPress site with a full admin panel and the ability to create posts and pages. At this point, you probably have two questions: How is this possible? And why is it useful?


WordPress Playground lets you run WordPress entirely in your browser

Image Credits: Romain Dillet / TechCrunch

Image Credits: Romain Dillet / TechCrunch

Adam Zielinski and other contributors from Automattic and the WordPress community have created a WebAssembly-based WordPress runtime so that you can start a WordPress server by loading a page. The usual MySQL database has been replaced with a file-based SQLite database. And a service worker acts as the web server and translates browser requests into WordPress responses.

WordPress loads in less than ten seconds on my laptop. You can mess around as much as you want as changes are gone when you refresh the page. There are options to store data in the browser or in a local computer directory too.

And that's the main idea behind WordPress Playground. It's a sandboxed environment where you can try new things, showcase some stuff you've been working on and test your code against different versions of WordPress and PHP.

For instance, WordPress Playground can be used to try a plugin, a theme or a block to see if it fits your needs. You don't have to install it on a live WordPress site and it's easier than creating a staging site.

There are two ways to install a plugin in WordPress Playground. You can download a ZIP file of a plugin and then upload it to Playground. Or you can simply change the URL to something like playground.wordpress.net/?plugin=MYCOOLNEWPLUGIN to automatically boot up a WordPress site with the plugin installed.

WordPress Playground can handle many configuration options as query parameters in the URL, such as the PHP version, the WordPress version, the WordPress URL that should be loaded when you load the page, etc.

These parameters could be particularly useful for plugin developers that want to test a new version of their plugin on a fresh WordPress install. Theme developers could also use Playground to embed a live demo of their theme in an