Preview Gutenberg Development Branches in Your Browser

WordPress Playground now loads GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ development branches directly in your browser. Test the latest trunk changes or explore feature branches without creating a pull request or setting up a local environment.

This solves a common challenge: testing bleeding-edge Gutenberg development typically requires cloning repositories, running build scripts, and managing local installations. Now you can skip all that.

Why does this matter?

New features land trunk daily, and experimental work occurs in feature branches before being merged into pull requests. Previously, you could only preview specific PRs in Playground, and now you can preview any branch related to a pull request.

This opens new possibilities:

  • Test the Gutenberg trunk branch to catch issues before they reach release.
  • Explore Gutenberg experimental features and fixes before they’re merged.

How do you preview branches?

Playground introduces two new Query API parameters gutenberg-branch. Add them to your Playground URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to load specific branches.

Preview Gutenberg trunk or a specific feature branch:

https://playground.wordpress.net/?gutenberg-branch=trunk

Other branches:

https://playground.wordpress.net/?gutenberg-branch=add/new-feature

What about pull requests?

Pull request previewing still works exactly as before for Gutenberg and WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. If you know the PR number, use:

https://playground.wordpress.net/?core-pr=9500
https://playground.wordpress.net/?gutenberg-pr=73010

What should you know?

When you preview a branch, Playground loads the latest available build artifact from GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Actions. If GitHub Actions is still building the most recent commit, Playground uses the next available build. This means you might see changes from a few commits back, not the absolute latest code. This approach strikes a balance between freshness and reliability.

This feature works anywhere you use the Playground Query APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., ideally, for testing and bug reporting. The playground can be embedded for educational purposes in future releases. For example, if you’re documenting a new Gutenberg feature still in trunk, link directly to a Playground instance that demonstrates it.

Start testing today

The WordPress and Gutenberg teams constantly ship improvements. With branch previewing, you can explore these changes the moment they merge, report issues early, and contribute to WordPress development—all from your browser.

Try it now and learn more about Query API documentation.

WordPress Playground: 2025 Year in Review

A lot happened for Playground this year! Let’s review what changed and why it matters for your work:

99+% of WordPress Plugins Supported in Playground

Nearly every pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party from the WordPress plugin directory works in Playground. In testing with the top 1,000 plugins, 99% install and activate successfully. The handful that don’t work yet either crash even outside of Playground or need a few more Playground platform improvements the team is actively working on.

Speaking about compatibility, Playground is now powerful enough to run PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. applications beyond WordPress:

  • PHPMyAdmin for database management – available via the sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. on playground.wordpress.net
  • Composer for managing PHP dependencies – available for developers via Blueprints
  • Laravel – try it out! 

…and a lot more! Try bringing your favorite PHP tools into Playground – they may just work. And please share your experience with others in the comments or at the #playground SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel!

Playground Got Faster—A Lot Faster

Playground performance got a major boost in 2025. Enabling OpCache alone cut the average response time by 42%—from 185ms down to 108ms. On top of that, the Playground CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. uses multiple workers (with the --experimental-multi-worker flag) and processes concurrent requests in parallel instead of making them wait in line.

There’s a lot more! Playground now pre-fetches update checks before you even open wp-admin. Network responses start streaming right away instead of waiting for complete downloads. WordPress loads before the optional parts of the Playground app. More Playground assets are cached, and the cache is utilized more.

All these improvements compound. Playground feels faster because it is faster.

New PHP Extensions Support Modern Development Workflows

In 2024, Playground established a solid foundation with coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. PHP extensions such as bcmath, xml, curl, and mbstring. In 2025, the support extended to:

  • XDebug – available in CLI with IDE integration.
  • SOAP, OPCache, ImageMagick, GD 2.3.3, Intl, and Exif PHP extensions.
  • WebP and AVIF image formats.
  • Networking is now enabled by default on playground.wordpress.net, allowing PHP to request any URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org.
  • There’s also an ongoing exploration to use XDebug through browser devtools and without an IDE.

In addition, Playground now supports dynamic extensions under the hood, with Xdebug and Intl being the first two dynamic extensions. This unlocks a future on/off switch for loading specific extensions so that you can test how your plugin behaves in different hosting environments.

State of the Art MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. Emulation

In 2025, Playground upgraded its MySQL support with a brand-new, state of the art MySQL-on-SQLite database driver. It’s likely the most comprehensive open-source library of its kind in any language. Developed in the sqlite-database-integration plugin, it leverages a custom-made MySQL query parser and translation logic to support even those highly nuanced MySQL queries.

In 2025, it became powerful enough to support:

  • PHPMyAdmin and Adminer – available with a click directly on playground.wordpress.net.
  • 99+% of WordPress directory plugins.
  • 99+% of WordPress core unit tests.

Looking forward, the Playground team is working on MySQL binary protocol support. Once that lands, you’ll be able to use the mysql CLI, connect with database management apps, establish PDO connections, and tap into the full ecosystem of MySQL developer tools—all running against Playground’s CLI SQLite backend.

A Developer Toolbox, One Click Away

playground.wordpress.net now provides plenty of developer tools right in your browser:

And if you’d like to preview Pull Requests in your project using Playground, see the “Try in Playground” GitHub action. It automatically adds a preview link to every pull request in your repository. Reviewers just click the link and see your changes running in WordPress—no need to pull code or configure anything locally.

Local CLI Workflows

Playground CLI hit a stable release with several powerful new features to streamline your development workflow:

  • Auto mode to start a local WordPress server with your plugin or theme installed. Run npx @wp-playground/cli server –auto-mount in your local plugin or theme directory. That’s it!
  • Debug with XDebug. Add a single CLI flag and immediately connect via VS Code or PhpStorm. Set breakpoints, watch variables change as code executes, and step through your functions line by line. The Playground team is also exploring connecting XDebug to Chrome DevTools (unreleased, work in progress).
  • Multi-worker support: Use –experimental-multi-worker to enable concurrent operations. While one worker waits for a network response, another processes PHP. No more slowdowns.
  • runCLI() lets developers embed WordPress Playground instances directly in JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/./Node.js applications. It’s useful for automated testing workflows and building desktop apps, such as Studio, on top of Playground.

Blueprints

Blueprints (WordPress starter configurations) received many major upgrades this year:

  • Blueprints editor – Create your Blueprints directly on playground.wordpress.net with the new, built-in editor.
  • Blueprint bundles – Ship images, zip files, and media with your Blueprint.
  • Visual Blueprints browser – Explore ready-made starter sites for blogs, news sites, and organizations from the Blueprints gallery. Launch them in Playground with a click.
  • .git directory support – Create a .git directory for any repositories cloned via Blueprints to use with your everyday git tools.
  • Blueprints v2 living specification was published to make Blueprints more accessible to humans and AI tools. The new format standardizes how post types, content, translations, fonts, and media files are defined, while making the notation more succinct. An all-PHP Blueprints runner is being developed in the php-toolkit repository, and Playground CLI runs it when the --experimental-blueprints-v2-runner flag is used.

Other highlights

Community Impact

Playground was used 1.4 million times this year to showcase plugins, test code changes, and teach others.

The community stepped up in ways that went far beyond code. Community contributors translated the documentation into French, Spanish, Portuguese, Japanese, Gujarati, and Tagalog, with Bengali translations now underway. Over 1,000 plugins from the directory enabled the Playground-powered “Preview” button. 48 developers earned the Playground contribution badge for their work on code, documentation, and community support.

From the flagship events down, Playground was everywhere: at WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Europe 2025 @berislavgrgicak showed how to build automated tests with Playground, and @bph walked through creating one-click demos at WordCamp Asia 2025. @danieldudzic demoed testing WooCommerce faster than a Formula 1 pit stop at WordCamp Gdynia. @nilovelez called Playground “the best tool ever invented for teaching WordPress” at WordCamp Galicia. @muryam brought Playground to WordCamp Islamabad, showcasing how to build, test, and explore WordPress. And even beyond that, @mrfoxtalbot, @wpaurorautasic, @fellyph, @sakaruk, and @magdalenapaciorek took Playground to Madrid, Lisboa, Wrocław, Nepal, and Rio de Janeiro, turning Playground into a recurring theme in talks on testing, education, and release workflows.

Playground also enabled the community to build great tools and workflows. @smrubenstein integrated Playground CLI with GitHub Copilot and shipped four features in one week—work that would otherwise take months. @bacoords built dynamic Blueprints running on Cloudflare Workers for runtime-configurable WooCommerce demos. Studio, a local development environment, added support for Blueprints. Telex lets you generate Gutenberg blocks from text prompts and instantly test them in Playground.

There’s more! @akirk added many new steps to his Blueprint development tool Playground Step Library, a versatile paste handler for Markdown, HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites., JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML., and more. @jamesmarsland launched PootlePlayground.com, an AI-aided Blueprint generator. And TYPO3—a different CMS—built a TYPO3 playground with WordPress Playground as a foundation, proving the impact reaches beyond the WordPress ecosystem.

Kudos to all contributors:

@ajitbohra, @akirk, @aksyonov, @andraganescu, @amieiro, @ashfame, @aslamdoctor, @bacoords, @berislavgrgicak, @beryldlg, @bph, @brandonpayton, @dd32, @devmuhib, @dhruval04, @dhruvang21, @dilip2615, @fellyph, @getdave, @hmbashar, @huzaifaalmesbah, @ingeniumed, @ivanottinger, @janjakes, @janwoostendorp, @jdahir0789, @jeffpaul, @jhimross, @jonsurrell, @josevarghese, jswhisperer, @juanmaguitar, @justinnealey, @karthickmurugan, lukaszuznanski, madhavraj2004, @marc4, mbuella, @mehrazmorshed, @merkushin, @mosescursor, @mrfoxtalbot, @mujuonly, @mukesh27, @muryam, @n8finch, @ndiego, @nikunj8866, @noruzzaman, oskardydo, @passoniate, @praful2111, @psykro, @ravigadhiyawp, @rollybueno, @sakaruk, @sandeepdahiya, @sandipsinh007, @sejas, @shailu25, @shimotomoki, @shiponkarmakar, @sirlouen, @tomayac, @vipulgupta003, @wojtekn, @wpaurorautasic, @yannickdecat, @zaerl, @zieladam.

Thank you all for being part of this journey! Here’s to making WordPress easier and more accessible for everyone.

Props to @akirk, @berislavgrgicak, @janjakes, @bpayton, @yannickdecat for their help with writing and reviewing this post. Also, props to all of you who helped get Playground where it is today!

+make.wordpress.org/core/

Debugging with Xdebug is now available in WordPress Playground

Have you ever faced a moment where your application won’t run, and you need to understand the steps that led to the failure? Xdebug is the perfect tool for this, but debugging a PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. application inside WebAssembly was a challenge until one of the most recent updates to WordPress Playground.

WordPress Playground now supports Xdebug. You can connect Visual Studio Code and PhpStorm IDEs to debug PHP code with breakpoints, step-by-step execution, and variable inspection. This experimental feature needs your feedback.

What can you do with Xdebug?

Connect Xdebug in Playground to your IDE to:

  • Set breakpoints — Pause execution on specific lines
  • Step through code — Move line by line during execution
  • Inspect variables — View values during execution
  • Evaluate expressions — Test code in the current context

Getting Started with Xdebug

Let’s debug a simple pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party using the Playground CLI and Xdebug to demonstrate this feature. But don’t worry, this feature is also available for the PHP-WASM CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress..

Prerequisites

You need:

  • Node.js 23 or higher and npm installed
  • @wp-playground/cli version 3.0.20 or higher
  • Visual Studio Code with the PHP Debug extension installed or the Xdebug extension configured in PhpStorm.

For Visual Studio Code and IDEs forked from it, we do recommend the official PHP Debug extension from Xdebug.org. This is required for debugging PHP in VS Code, not a specific requirement for WordPress Playground.

Configuration Steps

1. Prepare your code for testing

For this demo, I will use the following code. It displays a message in the WordPress Admin Dashboard. To see this code in action, you must access the /wp-admin/ address:

<?php
/**
 * Plugin Name: Simple Admin Message
 * Description: Displays a simple message in the WordPress admin
 * Version: 1.0
 * Author: Playground Team
 */


// Prevents direct access
if (!defined('ABSPATH')) {
    exit;
}


// Displays admin notice
function sam_display_admin_message() {
    $message = 'Hello! This is a simple admin message.';
    ?>
    <div class="notice notice-info is-dismissible">
        <p><?php _e($message, 'simple-admin-message'); ?></p>
    </div>
    <?php
}
add_action('admin_notices', 'sam_display_admin_message');

2. Configure your IDE to listen for Xdebug

The WordPress Playground CLI has a flag that can help developers if they don’t have Xdebug configured: --experimental-unsafe-ide-integration=, which currently supports two IDEs: vscode and phpstorm.

This will save time by generating the necessary files to get your debugging started.

Visual Studio Code

To start debugging, VS Code needs the .vscode/launch.json file. Here is an example:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9003
    }
  ]
}

Start the debugger with F5 or “Run > Start Debugging”. Run the plugin with the Playground CLI to see the execution stop when the code hits a breakpoint.

To debug the plugin above, we can initialize the plugin in the Playground CLI with the following code:

npx @wp-playground/cli@latest server --xdebug --experimental-unsafe-ide-integration=vscode --auto-mount

PhpStorm

Configure PhpStorm with path mappings and a PHP Remote Debug configuration.

  1. Create a PHP Remote Debug configuration.
  2. Click on Start Listening for PHP Debug Connections.
  3. Run the plugin with the Playground CLI.

To run the plugin with the Playground CLI, execute the command in the terminal:

npx @wp-playground/cli@latest server --xdebug --experimental-unsafe-ide-integration=phpstorm --auto-mount

See the Xdebug documentation in PhpStorm for detailed configuration instructions.

Running Xdebug with PHP-WASM CLI

Another option is to use Xdebug with PHP-WASM CLI, which is useful when you would like to debug only PHP without a WordPress environment.

To run it, you will need to set up Xdebug in your development environment. Once you are ready, add the breakpoints to your PHP file and run the command point to the file that you would like to debug. For example, the file below is located at src/test.php:

<?php

$test = 42; // Set a breakpoint on this line

echo "Output!n";

function test( $output ) {
    echo "Hello Xdebug World!n" . $output . "n";
}

test($test);

At the terminal, you run the command:

 npx @php-wasm/cli@latest --xdebug php/test.php

The result will be starting the debugging mode at the IDE:

A WordPress Playground team effort to solve a complex problem

Bringing Xdebug to WebAssembly required solving technical challenges. The Playground team spent months turning a tracking issue from May 2023 into working code.

Technical Achievement

The WordPress Playground team has made significant strides in integrating Xdebug for in-browser debugging. This effort involved numerous pull requests that tackled a range of technical challenges:

  • Asyncify Extension: Added Xdebug support via asyncify-specific shared extension builds and loaders.
  • IDE Integration Enhancements: Introduced experimental IDE path mappings for seamless debugging between the Playground’s virtual file system (VFS) and host IDEs.
  • Xdebug Bridge: Enabled the bridge to read files directly from the VFS, aligning breakpoints and source files for consistent debugging experiences.
  • CLI UX Improvements: Refined the CLI experience to prevent breakpoints from interrupting the Playground boot process unnecessarily.
  • DevTools & Debugger Enhancements: Preloaded files for improved DevTools debugging (#2527), added syntax highlighting (#2566), and enhanced array inspections and Xdebug protocol handling (#2409).
  • Upgraded Toolchain (#2910): Upgraded Emscripten to address linker issues, ensuring smooth dynamic loading of shared extensions like Xdebug.

Together, these enhancements have enabled robust step-debugging workflows, bridging the Playground’s WASM environment with modern IDE capabilities. Additionally, earlier groundwork (#673, #831) on dynamic loading set the foundation for these advancements.

The result? Xdebug in WordPress Playground isn’t just functional; it further empowers development and testing entirely in-browser.

What’s Next

The team continues working to bring Xdebug support to more Playground builds and explore debugging directly within browser developer tools.

Try Xdebug today and share your feedback on the original tracking issue. Check the Xdebug documentation for more configuration instructions, IDE integration guides, and troubleshooting tips.

Props to @zieladam and @yannickdecat

WordPress Playground Meeting Summary: October 10, 2025

Location: #playground Slack Channel

The WordPress Playground team held its weekly meeting on October 10, 2024. Here’s a summary of what was discussed.

Announcements

AI-Powered Documentation Search

The team added a new feature to the WordPress Playground documentation that uses AI to answer user questions. The implementation uses kapa.ai and is currently in testing. The team is collecting community feedback. Thanks to @zaerl for implementing this feature.

PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. Playground BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.

A new PHP Playground beta was released, featuring an IDE-like interface with:

  • File Explorer.
  • Terminal with support for PHP, WP, and Composer commands.
  • Browser-based development capabilities.

This enhancement builds on the previous version created by @zieladam and incorporates community feedback. The new version enables users to use Composer and compile PHP directly from the browser.

Playground Importer Improvements

Thanks to issue reports from @bph, the Playground importer now auto-rewrites URLs from the original site to Playground paths using wordpress-importer 0.9.1+.

CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. Performance Updates

The Playground CLI received performance improvements, now using multi-worker startup by sharing WordPress files via the local filesystem instead of zip copying.

Landing Page Improvements

@zieladam refactored the landing page, improving performance and fixing issues some users experienced due to customizations on the web version of Playground. The team also added a new favicon that is visible in both light and dark modes, addressing feedback from @Krupa.

Merge Activity

Since the last meeting, the team has merged 30 pull requests.

Documentation Updates

The team celebrated translation contributions from @Dilip Modhavadiya, @Béryl, @shimomura Tomoki, and @Shail Mehta, who submitted new translations for French, Japanese, Gujarati, and Tagalog.

@fellyph created a base for Bengali translations and is working with @Muhibul Haque to expand Bengali language support.

Community Highlights

Contributor Badges

Two more community members earned the contributor badge this week, bringing the total to 37 members with contributor badges.

WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Presentations

Several community members presented about WordPress Playground at recent WordCamps:

The team encourages anyone who has given a talk about Playground or created related content to share it so the Resources page can be updated.

Updates from Contributors

@fellyph attended WordCamp Galicia, where he collected community feedback, ran the Playground table at contributor dayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/., reviewed translations in the repository, and prepared the base structure for Bengali translations. He plans to prepare a page for WP Credits in the documentation and update the Playground documentation.

@bpayton worked on updates to make it easier for teams to build and self-host the Playground web app, giving teams control over their deployedDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. version while still being able to use playground.wordpress.net.

@zieladam has been:

  • Testing the new XDebug feature.
  • Exploring full-fledged blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. development in the browser by running Node.js and webpack, which could complement the recently shipped PHP Playground beta.
  • Helping Birgit import navigation menus via WXR and troubleshooting a bug in the process.

@janjakes has been improving the SQLite pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, intending to support PHPMyAdmin in the near future.

Open Floor

Translating the Admin Panel UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing.

@fellyph raised a question about whether the admin panel UI at playground.wordpress.net should be translated. After watching @nilovelez‘s talk about WordPress Playground, he noted it would be helpful if the UI could be explained in the presenter’s native language.

Community feedback:

  • @Moses Cursor noted that people from non-English speaking regions would be encouraged to use Playground more if the interface were available in their language.
  • @bph emphasized that translating the interface would help non-English speakers embrace Playground and broaden its reach into non-developer spaces, such as teaching writing. Without translation, non-English speakers have difficulty using Playground for various purposes.

@fellyph will create an issue to track this feature request.

Next Steps

For more information, join our #playground Slack Channel, and see you in our next chat, which is scheduled for October 24th.

Introducing a new SQLite driver for WordPress

The new SQLite driver is now available in the SQLite Database Integration plugin (currently behind a feature flag), and powering the WordPress Playground website today.

Following the refactoring, the new SQLite driver now matches the current driver in terms of features and surpasses it in several key areas. However, there are still some aspects that would benefit from further feedback. Thanks to its new architecture, integrating additional features is now much faster, and work is underway to enhance MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. compatibility even further.

Architecture highlights

The new SQLite driver translates MySQL queries into SQLite statements and emulates MySQL behavior using a robust new approach, which includes:

  1. A complete, fast MySQL SQL lexer written in pure PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. with zero dependencies.
  2. A complete, version-aware MySQL SQL grammar definition, adapted from the MySQL Workbench grammar.
  3. Basic tooling to process and compress the grammar in pure PHP.
  4. An extra lightweight, universal grammar parser written in pure PHP with zero dependencies, by @zieladam
  5. An extensive test suite of 70 000 MySQL queries that we can parse successfully.
  6. new SQLite driver that translates and emulates MySQL queries on top of SQLite, using the abstract syntax tree produced by the new parser.
  7. A comprehensive MySQL information schema emulation layer on top of SQLite.
  8. An automated migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. flow for databases created with the previous SQLite driver.
  9. New test suites, including the WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. PHPUnit test suite, with over 99% of tests already passing.

Trying the driver

⭐️ Please share your feedback and real-world test results via GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ issues or as comments on this post.

Running WordPress on SQLite

WordPress and its plugins have long depended on MySQL, making a seamless switch difficult without breaking compatibility. Past SQLite integrations have mostly translated MySQL SQL into SQLite-compatible queries, but fully supporting advanced features and MySQL-specific behaviors remained challenging.

The new driver still processes MySQL queries by emulating them on SQLite, sometimes through direct conversion and other times with complex transformations. What’s new is a deeper emulation: queries are now parsed into an abstract syntax tree (AST), and key MySQL information schema tables are replicated in SQLite. This approach enables more robust support for MySQL features, greatly improving WordPress compatibility with SQLite.

New features

While the initial goal of the new SQLite driver was to reach full feature parity with the current implementation, it also introduces numerous enhancements and advanced capabilities:

  • Advanced support of the MySQL syntax.
    • sub-queries.
    • UNION and UNION ALL operators.
    • SHOW and DESCRIBE statements.
    • INFORMATION_SCHEMA tables.
    •  TEMPORARY tables.
    • table administration statements (TRUNCATEANALYZECHECK OPTIMIZEREPAIR).
  • Support for 
    • STRICT_TRANS_TABLES and STRICT_ALL_TABLES SQL modes.
    • NO_BACKSLASH_ESCAPES SQL mode.
    • USE <database> statement for the main database and INFORMATION_SCHEMA.
  • Automatic migration of databases created with the current SQLite driver.

Thanks to its redesigned architecture, the new driver lays the groundwork for future support of additional MySQL features, some of which were nearly impossible to implement in the current driver.

Examples

Take a brief look at some of the new tricks that the new driver can already handle.

Create the wp_users table:

CREATE TABLE wp_users (
  ID bigint(20) unsigned NOT NULL auto_increment,
  user_login varchar(60) NOT NULL default '',
  user_pass varchar(255) NOT NULL default '',
  user_nicename varchar(50) NOT NULL default '',
  user_email varchar(100) NOT NULL default '',
  user_url varchar(100) NOT NULL default '',
  user_registered datetime NOT NULL default '0000-00-00 00:00:00',
  user_activation_key varchar(255) NOT NULL default '',
  user_status int(11) NOT NULL default '0',
  display_name varchar(250) NOT NULL default '',
  PRIMARY KEY  (ID),
  KEY user_login_key (user_login),
  KEY user_nicename (user_nicename),
  KEY user_email (user_email)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The new driver can also execute arbitrarily complex queries using the INFORMATION_SCHEMA:

SELECT
  cols.DATA_TYPE,
  stats.INDEX_NAME,
  stats.COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS AS cols
JOIN INFORMATION_SCHEMA.STATISTICS AS stats
  ON  cols.TABLE_SCHEMA = stats.TABLE_SCHEMA
  AND cols.TABLE_NAME   = stats.TABLE_NAME
  AND cols.COLUMN_NAME  = stats.COLUMN_NAME
WHERE
  cols.TABLE_SCHEMA   = 'wp'
  AND cols.TABLE_NAME = 'wp_users'
ORDER BY INDEX_NAME ASC;
-- bigint   PRIMARY         ID
-- varchar  user_email      user_email
-- varchar  user_login_key  user_login
-- varchar  user_nicename   user_nicename

You can add a bit more advanced syntax like UNIONDISTINCT, CTEs, and function calls:

WITH
  cols AS (
    SELECT COLUMN_NAME AS column_name
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_SCHEMA = 'wp' AND TABLE_NAME = 'wp_users'
  ),
  indexes AS (
    SELECT DISTINCT INDEX_NAME AS index_name
    FROM INFORMATION_SCHEMA.STATISTICS
    WHERE TABLE_SCHEMA = 'wp' AND TABLE_NAME = 'wp_users'
  )
SELECT CONCAT(column_name, ' (column)') AS name
FROM cols
UNION ALL
SELECT CONCAT(index_name, ' (index)') AS name
FROM indexes
ORDER BY name;
-- ID (column)
-- PRIMARY (index)
-- display_name (column)
-- user_activation_key (column)
-- user_email (column)
-- user_email (index)
-- user_login (column)
-- user_login_key (index)
-- user_nicename (column)
-- user_nicename (index)
-- user_pass (column)
-- user_registered (column)
-- user_status (column)
-- user_url (column)

Finally, let’s export the table schema:

SHOW CREATE TABLE wp_users;
-- CREATE TABLE `wp_users` (
--   `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
--   `user_login` varchar(60) NOT NULL DEFAULT '',
--   `user_pass` varchar(255) NOT NULL DEFAULT '',
--   `user_nicename` varchar(50) NOT NULL DEFAULT '',
--   `user_email` varchar(100) NOT NULL DEFAULT '',
--   `user_url` varchar(100) NOT NULL DEFAULT '',
--   `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
--   `user_activation_key` varchar(255) NOT NULL DEFAULT '',
--   `user_status` int(11) NOT NULL DEFAULT '0',
--   `display_name` varchar(250) NOT NULL DEFAULT '',
--   PRIMARY KEY (`ID`),
--   KEY `user_login_key` (`user_login`),
--   KEY `user_nicename` (`user_nicename`),
--   KEY `user_email` (`user_email`)
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

The definition is returned exactly as supplied, confirming faithful emulation of MySQL’s SHOW CREATE TABLE.

The above scenario was never supported by the previous driver, and implementing it would have been extremely difficult due to its basic, token-based architecture. With the new driver design, advanced use cases like this can now be supported much more naturally.

What’s next

Stabilizing the new SQLite driver in the 2.x line of the SQLite Database Integration plugin requires your feedback. Once there is enough confidence, a  3.0 of the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party will be released where the new driver will be enabled by default (and not behind a feature flag like in 2.x). The new driver is also being continuously tested for compatibility with plugins from the WordPress Plugin Directory and expanding feature coverage.

After the 3.0 release and the new SQLite driver enabled by default, the development focus will shift to expanding MySQL functionality coverage, improving performance, and stabilizing the APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., with the future prospect of integrating the driver into WordPress Core.

Looking even further ahead, the new lexer and parser pipeline lays the foundation for supporting additional database engines within the WordPress ecosystem.

Props to for reviewing to @zieladam and @bph

Introducing Offline Mode and PWA Support for WordPress Playground

We’re excited to share that WordPress Playground now supports offline mode and can be installed as a Progressive Web App (PWA). These features allow you to explore and experiment with WordPress without needing an active internet connection, making it easier to develop and test your ideas on the go.

Offline mode

When you first visit Playground.WordPress.net, your browser automatically caches all the necessary files to use Playground. From that point on, you can access Playground.WordPress.net, even while flying or in areas without internet access, ensuring you can continue working on your projects without interruptions.

PWA support

For an enhanced experience, you can also install Playground on your device as a Progressive Web App (PWA).

This allows you to launch the Playground directly from your home screen—just like a native app—and makes accessing your WordPress projects or environment quicker and more convenient. For detailed instructions on installing PWAs, refer to this MDN guide.

Current limitations

While offline, there are a few limitations to keep in mind:

  • You won’t be able to switch between the PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. and WordPress versions, as this would require downloading additional files.
  • Offline mode works in most web browsers, but unfortunately, it doesn’t work in Firefox at this time.
  • When you install Playground as a PWA, it uses the current URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to install the app. This means that every time you open the Playground app, it will start with the settings from that URL. You can adjust the settings within the app after it starts, but note that the settings will be restarted the next time you open it.

Share your feedback

Please share your feedback with us on the Making WordPress Slack or report any issues you find on GitHub.

Playground Team Meeting Summary – December 13, 2024

The Playground team met to discuss recent updates, ongoing projects, and community questions. (Slack script) facilitated by @berislavgrgicak

Announcements

Contributor Updates

Open Floor

Thank you to all contributors for your participation! Stay tuned for updates in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. and on the Make WordPress blog.

#summary #meeting

Props to @zieladam for reviewing.

Using Playground for data liberation, site synchronization, and building streaming parsers

The contributors on the Playground team increase their focus on building the data migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. tools to help the Data Liberation project and unlock powerful new use cases for WordPress. The latest updates to Playground included a key prerequisite: the ability to manage multiple Playground instances as a site transfer requires two WordPress sites.

Why work on data tools at all?

Research proves that there are no reliable, free,  open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. solution for:

  • Content import and export
  • Site import and export
  • Site transfer (including bulk transfers, e.g., Tumblr -> WordPress or Weebly -> WordPress)

To successfully execute site-to-site synchronization, WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. would need reliable data migration tools. Yes, there is the WXR content export. However, it doesn’t work for backing up a photography blog full of media files, plugins, APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. integrations, and custom tables. There are paid products available, but nothing in core.

Many Playground use-cases are about moving your data. To name just a few:

Why is this so hard?

Moving data is a complex problem – consider migrating links. Imagine you’re moving a site from https://my-old-site.com to https://my-new-site.com/blog/. If you just moved the posts, all the links would still point to the old domain so you’ll need an importer that can adjust all the URLs in your entire database. The typical tools like preg_replace or wp_search_replace can only replace some URLs correctly. They won’t reliably adjust deeply encoded data, such as this URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org inside JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. inside an HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. comment inside a WXR export:

<wp:content>
    <!-- wp:image {"src": "https://ud83dude80-old-site.com/%73ite/"} -->
</wp:content>

A reliable replacement operation requires parsing each data format carefully and replacing the relevant parts of the URL. Four parsers would be needed:

  • an XML parser, 
  • an HTML parser, 
  • a JSON parser, 
  • a WHATWG URL parser. 

Most of those tools are not available. PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. provides json_encode(), which isn’t free of issues, and that’s it. You can’t even rely on DOMDocument to parse XML because of its limited availability and non-streaming nature.

What needs to be built?

After about 8 month of research, and many years of dealing with site transfer problems, using various WordPress synchronization plugins, past attempts of data importing, testing non-WordPress tools, the team @dmsnell and @zieladam came up with the following requirements:

  • Any parser would need to be streaming, re-entrant, fast, standard compliant, and tested using a large body of possible inputs.
  • The data synchronization tools must account for data conflicts, WordPress plugins, invalid inputs, and unexpected power outages.
  • The errors must be non-fatal, retriable, and allow manual resolution by the user. No data loss, ever,
  • The transfer target site should be usable as early as possible and show no broken links or images during the transfer.

Several parsers are now in a prototype state or early drafts of the following streaming libraries:

Moreover, WordPress core now has an HTML parser, and @dmsnell has been exploring a UTF-8 decoder that would enable fast and regex-less URL detection in long data streams.

There are still technical challenges to figure out, such as how to pause and resume the data streaming. As this work progresses, you’ll start seeing incremental improvements in Playground. One possible roadmap is shipping a reliable content importer, then a reliable site zip importer and exporter, then cloning a site, and then extending towards full-featured site transfers and synchronization.

Advantages of building it into Playground

Playground covers a lot of ground:

  • User-centric environment. The need to move data around is so natural in Playground. Many people asked for reliable WXR imports, site exports, synchronization with git, and the ability to share their Playground. Playground allows for active users feed back every step of the way.
  • Quality Assurance. Playground has flows in place to report problems and share reproduction links, making it a perfect environment for collaboration.
  • Space to mature the API. Playground doesn’t provide the same backward compatibility guarantees as WordPress core. So the team can prototype a parser, find a use case where our design breaks down, and start over.
  • Control over the runtime. With Playground, the team can lean on PHP extensions to validate ideas, test them on a simulated slow hardware, and ship them to a tablet to see how they do when the app goes into background and the internet is flaky.

Extending Playground methodically allows for building the spec-compliant, solid foundation WordPress needs.

What’s next?

The work is structured to ship a progression of meaningful user flows. For example, the Try WordPress extension guides you through extracting content from any website to a Playground site and will enable WordPress plugins to receive different types of content specific to their plugins and process them. This gives you choice in the outcome of your liberated data.

Furthermore, the team will take the necessary time to build rigorous and reliable software. An early version might be shipped of this or that parser once the architecture is solid. The goal is a solid design that will serve WordPress for years.

Progress will be communicated in the open to maintain feedback loops, and to keep using this work to ship new Playground features.You can read more detail on this GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Kickoff post: Kickoff Data Liberation: Let’s Build WordPress-first Data Migration Tools and follow along on the Data Liberation Tracking issue.

Props to @bph and @akirk for review.

+make.wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org//core/

#dataliberation