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.

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

Playground CLI adds ImageMagick, SOAP, and AVIF support

The WordPress Playground CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. version 3.0.20 is live! This update introduces powerful new 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. extensions (ImageMagick, SOAP, and AVIF GD Support) that enhance the capabilities of your in-browser WordPress instances, making the playground compatible with plugins and themes that utilize these extensions. Let’s dive into what’s new.

ImageMagick: Your All-in-One Image Processing

Many developers rely on ImageMagick for advanced image manipulation, and now you can use it directly within WordPress Playground. The new ImageMagick extension supports a wide range of formats, including: JPG, PNG, GIF, WEBP (for PHP 8.0 and newer).

This addition increases the PHP bundle size by approximately 4.39MB, a worthwhile trade-off for the power and flexibility it provides. We are also exploring the possibility of shipping ImageMagick in the browser in the future for even better performance.

SOAP Extension: Connecting to Web Services Made Easy

The SOAP extension now supports all PHP builds, allowing you to connect your Playground instances to SOAP-based web services.

Getting started is simple. Here’s a quick example of how you can use the SOAP client to convert temperatures:

<?php
try {
    // Create SOAP client that in theory Convert Celsius to Fahrenheit
    $client = new SoapClient('<your SOAP endpoint>');
    
    // Submit the values to the client
    $celsius = 25;
    $params = array('Celsius' => $celsius);
    $response = $client->CelsiusToFahrenheit($params);
    
    echo "Input: {$celsius}°C\n";
    echo "Result: {$response->CelsiusToFahrenheitResult}°F\n";
    
} catch (SoapFault $e) {
    echo "SOAP Error: " . $e->getMessage() . "\n";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

In the previous version of @wp-playground/cli, this code, it triggered a Fatal Error, and now it executes successfully. 

AVIF Support in the GD Extension

The GD extension in WordPress Playground now supports AVIF (AV1 Image File Format) for PHP 8.1 and newer. This enables you to convert images to and from the AVIF format, which provides higher compression, smaller file sizes compared to JPEG, and also supports transparency.

Now WordPress Playground compiles the libaom (AV1 codec) and libavif libraries (version 0.8.2) to WebAssembly, this is a significant technical achievement that brings modern image processing directly to your browser.

Two new functions are available for builders on WordPress Playground from the GD extension:

  • imagecreatefromavif: Reads an AVIF image and returns a GdImage instance for manipulation.
  • imageavi: Outputs or saves an image in AVIF format. With the possibility of setting quality and speed compression as parameters.

For more information, check the imageavif and imagecreatefromavif guides.

Practical Example

Convert a JPEG to AVIF:

<?php
// Load JPEG image
$image = imagecreatefromjpeg('photo.jpg');

// Save as AVIF with custom quality
imageavif($image, 'photo.avif', quality: 85);

// Clean up
imagedestroy($image);

echo "Converted photo.jpg to photo.avif\n";

Conclusion

These additions enhance the WordPress Playground’s compatibility with a broader range of plugins and themes. Is there another 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 you feel is essential to the WordPress ecosystem? Please let us know in the comments. 

To use the WordPress Playground’s latest version, run the command:

$ npx @wp-playground/cli@latest server

To learn more about @wp-playground/cli at the Playground CLI guide. You create! Share your projects and feedback with us in the  #playground Slack channel.

Help test WordPress 6.9 before release

The CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Team will release WordPress 6.9 in early December. Before that happens, the project is in the testing phase, and the Core Team needs you! The #core-test team is currently focused on testing the latest Release Candidate (RC) version, and we encourage everyone in the community to jump in and contribute.

Sometimes, users think that to contribute to the WordPress Core, they need to be highly skilled developers. But the WordPress project also needs contributors for documentation, translation, design, and testing.

Why is this testing phase so important?

This is where we identify and resolve those final issues, uncover unexpected bugs, and refine new features before releasing them to millions of websites.

WordPress powers more than 40%, which requires extensive testing. Your testing helps millions of WordPress sites.

How You Can Contribute

You don’t need to be a technical person or a seasoned developer to help. We need people with diverse views and varying levels of experience to test the new 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. and features, providing valuable real-world feedback.

To help, navigate to the WordPress Playground at https://playground.wordpress.net?wp=beta, which will open the latest release candidateRelease Candidate A beta version of software with the potential to be a final product, which is ready to release unless significant bugs emerge. version. WordPress Playground will provide a temporary environment in which you can test without fear of making mistakes.

WordPress 6.9 includes these features:

  • Notes: Add annotations within the editor
  • 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. visibility controls: Hide specific blocks from the inserter
  • Command Palette: Keyboard shortcuts available everywhere
  • Custom icons: For the social links block
  • Border radius size presets

The Core Test team created a complete testing guide with step-by-step instructions.

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 and Themes Testing

If you are a site owner or plugin developer, this is an opportunity to test if your plugins and themes are compatible with the new version of WordPress. So, install your plugins and themes on the WordPress Playground by adding URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org parameters:

https://playground.wordpress.net?wp=beta&theme=[YOUR_THEME]&plugin=[PLUGIN_1]&plugin=[PLUGIN_2]

Learn mode in the Query API Guide.

Spot Something?

If you encounter any issues but aren’t sure if it’s a bug or where to report the problem, share them on the WordPress alpha/beta forums. If you are confident that you have found a bug in WordPress Alpha/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./RCRelease Candidate A beta version of software with the potential to be a final product, which is ready to release unless significant bugs emerge., report it on Core Trac for rollback auto-updates and the Gutenberg GitHub repository for every other feature.

For helpful reporting guidelines, refer to the Test Reports section of the Test Handbook and review the Core Team guidelines for Reporting Bugs.