PR Preview with WordPress Playground: What changes in version 3 of the GitHub Action

Reviewing a 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. or theme Pull Request has always carried a bit of friction. To actually test the change, someone had to pull the branch, spin up a local WordPress, and activate the code by hand. That is exactly why the WordPress Playground PR Preview 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 by the repository owner. https://github.com/ Action exists: it adds a “Preview in WordPress Playground” button straight to the PR. As a result, any reviewer opens the environment with the code already applied in the browser, without installing anything.

The action already existed in v2. However, version 3 underwent an important simplification: the manual “glue” that each project had to write for builds was replaced by ready-made, reusable workflows. In this post, therefore, I’ll cover what the action does, why it’s worth it, how to set it up in the two possible scenarios, practical examples, and the step-by-step path to migrate from v2.

What the WordPress Playground PR Preview action does

In short, it publishes a preview link on the Pull Request. That link points to a WordPress Playground instance, in other words, a full WordPress running through WebAssembly (WASM) in the browser of whoever clicks it. Playground boots clean, installs the plugin or theme from the PR branch, and automatically activates everything.

The result, then, is a disposable, isolated environment created on demand that mirrors the state of that branch exactly.

Why use it

  • One-click testing: the reviewer needs no local setup and no WordPress installed.
  • Works with forks: external contributions get a preview without exposing repository secrets.
  • Plugin, theme, or both: you can create scenarios that combine several artifacts.
  • Handles complex builds: projects that rely on Composer, npm, or Vite are supported too, through dedicated workflows.
  • Real sandbox: the code runs in the user’s browser, isolated, without touching any server.

Scenario 1: no build step

This is the simplest path. Use it when the files committed to the repository run as-is, without compilation, for example, a plain 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/index.php plugin.

First, create .github/workflows/pr-preview.yml:

name: PR Preview
on:
  pull_request:
    types: [opened, synchronize, reopened, edited]

jobs:
  preview:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: WordPress/action-wp-playground-pr-preview@v3
        with:
          plugin-path: .
          github-token: ${{ secrets.GITHUB_TOKEN }}

For a theme, swap plugin-path: . for theme-path: .. Besides that, the permissions 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. is mandatory: the action needs pull-requests: write to write the link on the PR and contents: read to read the code.

Main inputs of the direct action

InputRequiredDefaultPurpose
plugin-pathone of fourRelative path to the plugin directory
theme-pathone of fourRelative path to the theme directory
blueprintone of fourCustom Blueprint 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. (string)
blueprint-urlone of fourURLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to a hosted Blueprint
modenoappend-to-descriptionappend-to-description or comment
github-tokenyesToken with PR write access
playground-hostnohttps://playground.wordpress.netBase Playground URL

You provide one of plugin-path, theme-path, blueprint, or blueprint-url. The mode, in turn, decides whether the link goes into the PR description body or as a comment.

Scenario 2: with a build step

When the preview depends on compilation (npm run build, Composer, etc.), v3 uses two workflows that talk to each other. First, one builds the untrusted PR code with read-only permissions. Then, the other publishes the result from the default branch, with write permissions, without ever executing the PR code. The only point of contact between them is the generated ZIP file — and that is precisely what keeps the flow secure.

The build workflow lives in .github/workflows/pr-preview-build.yml:

name: PR Preview - Build
on:
  pull_request:
    types: [opened, synchronize, reopened, edited]

jobs:
  build:
    uses: WordPress/action-wp-playground-pr-preview/.github/workflows/preview-build.yml@v3
    with:
      artifacts: my-plugin=build/my-plugin.zip
      node-version: '20'
      build-command: |
        npm ci
        npm run build:plugin-zip

The publish workflow, in turn, lives in .github/workflows/pr-preview-publish.yml:

name: PR Preview - Publish
on:
  workflow_run:
    workflows: ["PR Preview - Build"]
    types: [completed]

permissions:
  contents: write
  pull-requests: write

jobs:
  publish:
    permissions:
      contents: write
      pull-requests: write
    uses: WordPress/action-wp-playground-pr-preview/.github/workflows/preview-publish.yml@v3
    with:
      kind: plugin

The artifacts field uses the name=path/to/file.zip format — one per line, if you have several. The kind in publish, meanwhile, tells whether the artifact is a plugin or a theme. Besides that, the reusable workflows take care of automatically creating a ci-artifacts prerelease to host the ZIPs publicly. After all, Playground needs to download the asset, so it can’t be in a draft release.

Build workflow inputs

InputRequiredPurpose
artifactsyesname=path.zip entries, one per line
build-commandyesShell commands that produce the ZIPs
node-versionnoRuns actions/setup-node@v4 if set
php-versionnoRuns shivammathur/setup-php@v2 if set
fetch-depthnoPassed to actions/checkout@v4 (default: 1)

Practical example: custom Blueprint

Sometimes you need more than “install and activate”. Say, a plugin from the PR running alongside WooCommerce and already logged in as admin. In that case, use a Blueprint. It’s a JSON recipe that describes the site’s initial state.

- uses: WordPress/action-wp-playground-pr-preview@v3
  with:
    blueprint: |
      {
        "$schema": "https://playground.wordpress.net/blueprint-schema.json",
        "preferredVersions": { "php": "8.3", "wp": "6.6" },
        "steps": [
          { "step": "installPlugin",
            "pluginData": {
              "resource": "git:directory",
              "url": "https://github.com/${{ github.repository }}.git",
              "ref": "${{ github.event.pull_request.head.ref }}",
              "path": "/"
            },
            "options": { "activate": true } },
          { "step": "installPlugin",
            "pluginData": { "resource": "wordpress.org/plugins", "slug": "woocommerce" },
            "options": { "activate": true } },
          { "step": "login", "username": "admin" }
        ]
      }
    github-token: ${{ secrets.GITHUB_TOKEN }}

This Blueprint pins PHP 8.3 and WordPress 6.6, installs the code from the PR branch, adds WooCommerce from the official repository, and hands over an already-logged-in environment. For build scenarios, moreover, you can reference the generated ZIPs inside the Blueprint using the {{ARTIFACT_URL:<name>}} placeholder. That way, v3 resolves the public artifact URL for you.

Migrating from v2 to v3

In practice, the migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. varies with the complexity of your setup.

Simple plugins and themes (no build): here, almost nothing changes. Switch the action reference from @v2 to @v3 and keep the same inputs.

# works the same in v2 and v3
- uses: WordPress/action-wp-playground-pr-preview@v3
  with:
    plugin-path: .
    github-token: ${{ secrets.GITHUB_TOKEN }}

Projects with a build: this is where the real gain is. On v2 you needed a build workflow, plus manual parsing of the artifact name, plus an expose-artifact-on-public-url helper, plus manual Blueprint generation, and still the manual release publishing. v3, by contrast, replaces all of that with the two reusable workflows (preview-build.yml and preview-publish.yml) shown above. The step-by-step, therefore, looks like this:

  1. Create pr-preview-build.yml with the build workflow template.
  2. Create pr-preview-publish.yml with the publish workflow template.
  3. Define the artifacts in the artifacts field (name=path format).
  4. Set kind: plugin or kind: theme in publish — or, alternatively, use blueprint with {{ARTIFACT_URL:<name>}} placeholders for setups with multiple ZIPs.

Inputs such as artifact-name, artifact-filename, artifact-source-run-id, pr-number, and commit-sha, which existed only for the manual glue, are no longer needed in most cases.

Finally, watch out for the mandatory release cleanup: the change that breaks the most in practice is that draft releases no longer work. After all, Playground can’t download assets from a draft release without authentication. Therefore, if you have ci-artifacts releases in draft, convert them to prerelease or delete them.

Common gotchas

  • 404 error when opening the preview: the release is probably set as a draft instead of a prerelease. Fix it on the repository’s Releases tab.
  • Plugin doesn’t show up as installed: the ZIP must be extracted to a folder named after the slug. Make sure your build does that. For example:
    bash mkdir -p stage/my-plugin && rsync -a ./ stage/my-plugin/ && (cd stage && zip -r ../my-plugin.zip my-plugin)
  • Build failing when comparing against the base: if you use git diff against the base branch, set fetch-depth: 0 in the build workflow. After all, the default checkout brings only the latest commit.
  • Permission error: the permissions block is missing at the workflow or job level.

Conclusion

If you already used v2 for builds, migrating is worth it: you delete dozens of lines of manual glue and get tested, community-maintained workflows in their place. On the other hand, if you don’t use PR preview in your plugin or theme repository yet, the no-build scenario solves it with a few lines of YAML — and noticeably improves the experience for whoever reviews code in your project.

The full documentation lives at wordpress.github.io/action-wp-playground-pr-preview. For the more specific cases, also check the detailed migration guide.

WordPress Playground table at Contributor Day WCEU 2026

The WordPress Playground team is excited to be part of 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/ at WordCamp Europe 2026, taking place June 4, 2026, at ICE Kraków. Whether you’re a developer, designer, writer, tester, 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. author, translator, marketer, or simply interested in Playground, there will be several ways to get involved.

Read on to find out how to prepare and what to expect at the WordPress Playground table.

Important Times

All times are in Central European Summer Time (CEST).

  • 08:30 – Registration
  • 09:15 – Opening and welcome
  • 10:00 – Contributing to WordPress
  • 12:15 – Group photo
  • 12:30 – Lunch
  • 14:00 – Contributing to WordPress
  • 16:30 – Team summaries and wrap-up

Remote contributors are welcome to join via the #playground and #contributor-day channels on WordPress 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/.

Meet the Table Leads

Playground team will have three team reps during the event, who will be leading the WordPress Playground table:

In-person table leads

Berislav Grgicak (@berislavgrgicak) will also be supporting the Playground table.

Part of the team will be participating remotely throughout the day, answering questions and supporting contributors in the #playground Slack channel.

WordPress Playground Table Focus

There are many ways to contribute to WordPress Playground depending on your background and comfort level.

  • Testing and feedback: Help test Playground features, including PR Previews V3, the new SQLite integration, and tools powered by Playground such as My WordPress.
  • WordPress Studio: Help test the new version of WordPress Studio on Linux and provide feedback on the local development experience.
  • Blueprints: Help plugin developers create their own Blueprints and enable the Live Preview button for their plugins.
  • Documentation: Improve existing docs, suggest new guides, or help make Playground easier to understand for new users and contributors.
  • Translations: Playground documentation is currently available in several languages, and translation contributions are always welcome.
  • Good first issues: New contributors can start with issues labeled Good First Issue.
  • Design, marketing, and product feedback: You don’t need to write code to contribute. Designers, marketers, writers, educators, and site builders can help review the 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., improve onboarding, suggest new features, and identify opportunities for clearer communication.

A good quote from Jonathan Bossenger(@psykro):

Remember: it’s “Contributor Day,” not “Contribution Day.” The goal is to find meaningful ways to contribute and help move the project forward. Some work may continue after the event, and that’s expected. 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. is iterative.

If you’re not sure where to start, talk to a table lead in person or ask in the #playground Slack channel.

What WordPress Playground Is Building

WordPress Playground lets you run WordPress directly in the browser, without setting up a traditional local server. It helps people test WordPress, try plugins and themes, create demos, review pull requests, and build new contribution workflows with less setup friction.

Some of the key areas contributors may work with include:

  • Playground web instance: The public browser-based Playground available at playground.wordpress.net.
  • Blueprints: 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. files that define how a Playground instance should be configured, including plugins, themes, content, settings, and setup steps.
  • PR Previews: Playground-powered previews that make it easier to test WordPress pull requests directly in the browser.
  • SQLite integration: Ongoing work around improving WordPress support for SQLite-powered environments.
  • Playground CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress.: A Node.js package that allows contributors and developers to run WordPress locally without Docker, 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, or ApacheApache Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation. Apache is an Open Source software available for free..
  • WordPress Studio integration: Local development workflows powered by Playground, including ongoing testing for Linux support.
  • Documentation and translations: Contributor-friendly docs that help more people understand and use Playground across different languages and workflows.

You can learn more in the Playground documentation and the dedicated Contributor Day page.

Prepare at Home

To make the most of Contributor Day, please prepare before arriving. Wi-Fi at large events can be unreliable, and many contributors may be cloning repositories or installing dependencies simultaneously.

For most Playground contribution tasks, you will need:

  • A laptop
  • A 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 by the repository owner. https://github.com/ account
  • A 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/ account
  • GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/ installed
  • Node.js and npm are installed
  • A local copy of the Playground repository

We recommend cloning the Playground repository before Contributor Day:

github.com/wordpress/playground

Docker and Composer are not required for most Playground Contributor Day tasks.

If you want to work with plugin demos or Live Preview support, it may also help to review the Playground Step Library before the event.

Helpful Resources

Looking Ahead

At WCEU Contributor Day, we’ll focus on testing new features, improving documentation, supporting plugin developers with Blueprints and Live Preview, reviewing the user experience, and helping new contributors find their first meaningful contribution.

Contributors whose pull requests are merged may also be eligible for the WordPress Playground contributor badge on their WordPress.org profile. If you’re interested in Playground but unsure where to begin, join us at the Playground table or ask in the #playground Slack channel.