Test WordPress emails in Playground with the new Email tool

Did your contact form generate the notification you expected? Was the right welcome message generated for a new user? WordPress Playground now gives you a way to inspect those emails while you test a site in your browser. Open Dev Tools → Email to see messages generated by the current Playground, without setting up a mail server or checking a real inbox.

The Email tool starts empty and shows messages generated by the current Playground.

How email capture works

When WordPress sends a message through its normal wp_mail() path, 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 writes it to a sendmail-compatible program. Playground captures that message in the browser instead of delivering it. The website parses the captured message and adds it to the Email panel for the current site. You can select a message to check its subject, sender, recipient, time, and body, including 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. preview when the message contains HTML.

The work arrived in stages: sendmail capture in PR #3996, forwarding captured messages to the website in PR #4103, and the Email viewer in PR #4000.

Try it in a fresh Playground

You can generate a sample message without installing 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.:

  1. Open playground.wordpress.net and wait for WordPress to load.
  2. Select Dev Tools in the Dock, then Email. A fresh site shows No emails yet.
  3. Open Dev Tools → Terminal, select PHP, paste the snippet below, and select Run. The Terminal loads WordPress for you.
$sent = wp_mail( 'reader@example.invalid', 'Playground email test', 'Hello from WordPress Playground.' );echo $sent ? 'wp_mail() returned true' : 'wp_mail() returned false';
  1. Return to Dev Tools → Email and select Playground email test. Check the recipient, subject, and message body. The message appears in Playground; nothing is delivered to reader@example.invalid.

You can also test a WordPress action instead of running PHP. For example, create a user under Users with Send the new user an email about their account selected, then inspect the generated messages. Once a plugin is installed, perform the action that normally sends its message and check the same panel. The Terminal guide has more on running PHP against the active site.

Which plugins benefit?

The Email tool is useful wherever a plugin sends messages through WordPress’s usual mail path:

  • Forms: Submit a contact or lead form and check the notification’s recipient, subject, and submitted fields.
  • Registration and membership: Check welcome, approval, invitation, and account messages after a user action.
  • Commerce, bookings, and events: Inspect order, reservation, and confirmation emails while testing a workflow.
  • Email templates and notifications: Compare generated text or HTML across settings, themes, and WordPress versions.

Plugin developers can offer a Playground demo that lets testers complete an action and inspect its email in the same browser session. Contributors and documentation authors can also use it to reproduce WordPress notification behavior without supplying a working mailbox.

What the Email tool does not test

A captured email is not a delivered email. Even when wp_mail() returns true, that only shows the message was accepted for processing; it does not prove that an external recipient received it. The Email panel helps you inspect messages sent through Playground’s sendmail capture path. A plugin that sends through a separate SMTP connection or provider 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. may bypass that path, so use an appropriate delivery test for those integrations.

Messages in the Email panel belong to the current Playground runtime session. Reloading the Playground website tab or reopening a saved site clears the captured messages, even though the WordPress site itself can persist. Wait for Playground to finish loading before triggering a test action; messages sent during initial Blueprint setup may not appear.

Try the feature on WordPress Playground. If a message does not appear, report the steps in the Playground repository, including the plugin or WordPress action you tested and whether it uses wp_mail() or another mail service.

X-post: WordPress Contributor Toolkit 1.2: One app for your first Core or Gutenberg contribution

X-post from +make.wordpress.org/core: WordPress Contributor Toolkit 1.2: One app for your first Core or Gutenberg contribution

Explore the WordPress Playground Terminal with the new Dev Tools Dock

WordPress Playground has shipped two new features: an integrated Terminal for 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 and WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, and a group for developer tools options on the Dock. The compact Dock keeps the everyday actions in view while giving developers a direct path to the tools for inspecting and changing a site.

From the Terminal, you can inspect content, check configuration, test a WordPress 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., or make a quick change without setting up a local environment or leaving playground.wordpress.net. It runs against the active Playground, so a command reads or changes the same WordPress site visible behind the panel.

The New group for Developer Tools in the Dock

Visit playground.wordpress.net and wait for WordPress to start. The Dock at the bottom of the screen shows New, Playgrounds, Site Settings, Export, and Dev Tools. In its compact state, it hides the developer-facing buttons to give people exploring WordPress a simpler toolbar.

Select Dev Tools next to Export to expand the Dock. It reveals Blueprint, Database, Terminal, Files, Logs, and Email. Then select Terminal to open the runner for the current site.

The expanded Dock puts Terminal alongside the other developer tools.

Playground remembers whether the developer tools were shown or hidden across page reloads. Collapsing them keeps an unfinished Terminal or Blueprint draft, so you can reopen the tool and continue.

The other new feature is Terminal, which opens with two modes:

  • PHP runs short PHP snippets with WordPress already loaded.
  • WP-CLI runs WordPress command-line commands against the active site.

Each mode keeps its own input, results, and command history, so you can move between PHP and WP-CLI without losing your place.

Explore WordPress with PHP

PHP mode provides a syntax-highlighted editor with line numbers and a few ready-to-run examples. You can select examples such as Versions, Site URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org, List posts, Create post, or Active plugins, edit the code, and select Run.

PHP mode runs a snippet against the active WordPress site and displays the result in the same panel.

WordPress is loaded for you, and the opening <?php tag is optional. For example, this snippet lists the titles of the site’s posts:

foreach ( get_posts() as $post ) {
	echo $post->post_title . "\n";
}

You can also inspect versions and configuration:

echo 'WordPress ' . get_bloginfo( 'version' ) . "\n";
echo 'PHP ' . phpversion() . "\n";
echo 'Site URL: ' . get_site_url();

Each submission is evaluated independently. Variables from one run are not available in the next run, but changes made through WordPress APIs remain in the active Playground. For example, update_option() changes the site’s database just as it would when called by 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..

Use Ctrl+Enter or Command+Enter to run code from the keyboard. If the snippet is incomplete, it remains in the editor so you can finish it. Parse and runtime errors appear with concise messages, including a useful source position when available.

Manage the site with WP-CLI

Switch to WP-CLI when it’s the quickest way to inspect or change WordPress. Try a read-only command first:

wp option get blogname
WP-CLI mode accepts commands with or without the leading wp and shows their output below the prompt.

The leading wp is optional, so option get blogname works too. On the first WP-CLI run, Playground downloads the WP-CLI executable if it is not already available. Later commands reuse it.

Here are a few useful commands to try. Run each line separately:

wp core version
wp plugin list
wp post list --fields=ID,post_title,post_status
wp option get siteurl

You can also create content directly:

wp post create --post_title='Created from the Playground Terminal' --post_status=publish

The result reports Success: Created post followed by its ID. Run wp post list --fields=ID,post_title,post_status again to confirm the title and publish status. To view it in WordPress, close the Terminal and enter /wp-admin/edit.php in the Dock’s address field, then open the post from the Posts screen. Refreshing the welcome page alone will not display the new post. Each time you rerun the create command, it creates another post.

Set up real test scenarios

WP-CLI is especially useful for preparing a test site before you check the result in WordPress. You are building a plugin or want to check how a theme will behave in a specific screen. These examples run in a fresh Playground and use a terminal command to prep the test.

Test a WooCommerce cart and coupon

Start Playground with WooCommerce active. The plugin adds its own wp wc commands, and --user=admin gives them the permissions needed to manage store data. Create a published test product and a 10% coupon running those two commands separately:

wp wc product create --name="Playground Test Mug" --type=simple --status=publish --regular_price=19.99 --sku=playground-test-mug-01 --user=admin
wp wc shop_coupon create --code=PLAYGROUND10 --discount_type=percent --amount=10 --user=admin

Open the shop on the WordPress site, add Playground Test Mug to the cart, then apply PLAYGROUND10 under Add coupons. In a fresh Playground test, the product appeared at $19.99, and the coupon reduced the cart total to $17.99.

The commands create the fixtures; adding to cart and applying the coupon still happen in the browser. See the WooCommerce command reference for other store operations.

Prepare posts for CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. or Themes testing

When a feature needs more than one sample post, generate twelve published posts in one command:

wp post generate --count=12 --post_type=post --post_status=publish

The generated posts appear in Posts. In the Playground test, they also fill the blog’s first page and expose a second page of posts, giving testers content for pagination, sorting, search, or bulk-action checks. See the WP-CLI post generation reference.

For a focused 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.-editor smoke test, create a post with saved Paragraph block markup:

wp post create --post_title='Block smoke test' --post_status=publish --post_content='Block smoke test'

Use the post ID reported by the command to open /wp-admin/post.php?post=ID&action=edit, replacing ID with that number. The test post opened as a Paragraph block in the editor. For a plugin block, replace this example with that block’s actual saved markup: markup that does not match the block’s definition can trigger a validation warning. The block markup guide explains the format.

A command runner, not a full shell

The integrated Terminal focuses on PHP and WP-CLI. It is not a general-purpose shell, and it does not provide an interactive TTY.

Pass every required value as part of a WP-CLI command. Commands that wait for interactive input are rejected instead of interpreting unavailable input as an empty value. Long-running interactive commands such as wp shell and wp server are not supported.

This constraint makes browser-based execution more predictable. It also protects a command from unexpectedly changing WordPress after a failed attempt to read from standard input. The same fail-fast behavior now applies to the Blueprint wp-cli step, so Blueprint commands must also provide their required arguments explicitly.

A faster path from question to answer

The Terminal fills the space between clicking through wp-admin and building a local development environment. Plugin developers can check an option or active plugin list while reproducing a bug. Documentation authors and learners can run WordPress PHP examples in context. Contributors can inspect a test site before exporting it or sharing a reproducible Blueprint.

The Terminal arrived in pull request #3808, Add Terminal to the Dock, building on an earlier request to integrate WP-CLI into the Playground website. The Dev Tools Dock update made that growing set of tools easier to show or hide.

Thanks to Alex Kirk for developing the Terminal and to the contributors who built and refined the Dock controls.

Try it and share feedback

Open WordPress Playground, check the new features, and tell us what you think. If you find a bug or have an idea for the workflow, open an issue in the WordPress Playground repository or join the #playground channel in Making WordPress Slack.

WordPress Playground and WebMCP: bringing AI agents into your browser workflow

WordPress Playground gives AI agents a practical place to build, test, and explore WordPress: a running site in the browser that you can inspect as the work happens. With WebMCP, compatible agents can discover tools offered by Playground and use them alongside the interface you already know.

OpenAI now added support for these “Site tools” in the ChatGPT desktop app’s built-in browser. This creates another way to work with Playground through natural-language requests, from building a landing page to preparing a reproducible 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. demo. Availability depends on the model, workspace, and rollout. OpenAI’s Site tools guide

What is WebMCP?

WebMCP is a proposed browser 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. that lets web applications expose actions as tools with descriptions and structured inputs. It is currently a W3CW3C The World Wide Web Consortium (W3C) is an international community where Member organizations, a full-time staff, and the public work together to develop Web standards.https://www.w3.org/. Community Group draft, not an official W3C standard. WebMCP specification

The agent discovers tools on the page and calls them within the live browser session. You can continue using the interface, inspect the result, and guide the next step. Explicit tools can reduce the need for the agent to infer an action from buttons, screenshots, or changing page layouts.

MCP and WebMCP provide different connection paths. MCP connects an AI application to a local or remote server. WebMCP exposes actions through an open webpage. Playground supports both: its MCP integration uses a local Node.js server and a WebSocket bridge, while its WebMCP integration works through the browser without that intermediary. Playground MCP integration, WebMCP integration

Within Playground, these integrations reuse shared tool definitions and the site management interface. The Site Manager API handles operations such as listing and saving sites, and provides access to the active Playground client for 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 execution, requests, and filesystem operations. This is shared Playground infrastructure; MCP and WebMCP do not have an identical protocol API.

Getting started

Open WordPress Playground in a browser environment that supports WebMCP and wait for WordPress to load.

In the ChatGPT desktop app’s built-in browser, select Site tools in the address bar, then Available site tools. OpenAI currently recommends GPT-5.6 Sol or GPT-5.6 Terra; its documentation says Site tools are unavailable with GPT-5.6 Luna and in Enterprise or Edu workspaces. Check the current setup guidance as availability changes.

Playground’s built-in WebMCP tools currently include:

PurposeTools
Site managementplayground_get_website_url, playground_list_sites, playground_rename_site, playground_save_in_browser
PHP and requestsplayground_execute_php, playground_request
Navigation and informationplayground_navigate, playground_get_current_url, playground_get_site_info
Filesystemplayground_read_file, playground_write_file, playground_list_files, playground_mkdir, playground_delete_file, playground_delete_directory, playground_file_exists

This list reflects the WebMCP registration code and shared tool definitions checked on September 5, 2026. Plugins can add their own tools through the proxy described below.

From the browser to a virtual WordPress

Playground runs WordPress locally in your browser using PHP compiled to WebAssembly. Its WordPress interface appears inside a nested iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser.. Here, “local” means the browser’s WordPress runtime, rather than a separately installed PHP server on your computer. Playground project documentation

That nesting creates a discovery problem. A plugin might register a useful WebMCP tool inside WordPress, but an agent looking at the outer Playground page cannot necessarily see it. OpenAI’s built-in browser currently discovers tools on the top-level page, not inside iframes. Site tools limitations

The WebMCP proxy, merged on September 3, bridges this gap. It advertises the embedded site’s registered tools on the outer Playground page and forwards calls back into WordPress.

The proxy makes a plugin’s registered tools discoverable outside the WordPress iframe, while their execution remains inside the site. No separate WebMCP server is needed for this path.

Imagine a plugin that offers an action to create a draft event. When that plugin registers a WebMCP tool, Playground carries its description and input schema up to the outer page. The agent can discover the action and send its inputs down through the proxy. The plugin executes the action inside WordPress, and the result returns along the same path.

The proxy also follows changes to the active page and site, removing tools that are no longer registered. Proxy implementation

WordPress abilities and WebMCP tools are related but distinct. A plugin can wrap a WordPress ability in a WebMCP tool; registering an ability alone does not automatically make it appear through this proxy. Agents can also use Playground’s existing playground_request tool to discover and invoke abilities exposed through the WordPress Abilities REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. Current request-tool guidance

Three workflows to try

The space for creativity is open; the Playground team has tested Playground with WordPress, and the results are interesting. I will l st three examples that you can try right now.

Build a landing page

One experiment I repeated was asking an agent to build a landing page directly in Playground. An event, a football supporters’ site, or a tourism page gives the agent a concrete design task and a live WordPress environment in which to work.

Try this prompt:

Create a polished, responsive tourism landing page that welcomes visitors to Lagos, Portugal, and positions the city as one of the Algarve’s must-visit destinations.

Use the site-building tools available in the browser to build the page directly in WordPress Playground. Create a complete, visually engaging page—not just a written proposal.

This is the result:

Run it on Playground

Creating a testing dashboard

Another experiment was a dashboard for tracking compatibility across WordPress versions. Each version links to a reproducible Playground environment, making it easier to share testing work with a team.

Build a polished, responsive WordPress AI Plugin Compatibility dashboard using Site Tools and WordPress Playground.

The dashboard must manage compatibility results dynamically instead of hardcoding version statuses. Create a simple editable data source for WordPress versions, where each record includes:

- WordPress version
- Status: Supported, Not supported, or Needs testing
- Short compatibility note
- Test date
- WordPress Playground test URL

Display the records as version cards in a responsive grid. Include summary counts for supported, not supported, and pending versions. Make it easy to add, remove, or update versions and their status without changing the page layout.

Each card should provide a button to open its associated reproducible WordPress Playground test. Design the interface as a focused, modern developer compatibility lab, with clear visual distinction between supported, unsupported, and untested states.

Turn plugin features into interactive demos

A plugin developer can also create a page linking to Playground demos of individual features. Visitors can try the plugin without installing it on their own site: each Blueprint prepares a fresh Playground instance with the plugin and example content.

Playground also has an Email panel for inspecting messages captured from the running site. This can help you check what a form generates without treating local capture as proof of delivery to an external inbox. Captured-mail forwarding, Email viewer

Run it on Playground

These examples show how Playground can support a shared workflow: the agent builds or configures something, and you inspect it in the same browser session. The WebMCP proxy extends that workflow to actions provided by plugins inside WordPress.

What are you creating with WordPress Playground and WebMCP? Share your examples in the comments or join the conversation in the 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/ #playground channel.

X-post: Runnable code examples are now live in the Code Reference

X-post from +make.wordpress.org/core: Runnable code examples are now live in the Code Reference