October 22, 2025
This video demonstrates a powerful development feature of the WordPress Playground: the ability to spin up a complete WordPress instance directly within a Node.js/TypeScript environment using the runCli from @wp-playground/cli package.
Fellyph from Automattic shows how developers can leverage this tool not just for simple preview environments, but for advanced automation, particularly End-to-End (E2E) testing.
What You Will Learn:
Programmatic WordPress Instances: How to import and use the @wp-playground/cli package to run a full WordPress server directly from your TypeScript application.
Custom Configuration: Specifying required PHP versions (e.g., 8.3) and WordPress versions.
E2E Testing with Playwright: Setting up a robust testing workflow using the Playground CLI combined with Playwright to ensure your plugins and features work as expected.
The Power of Blueprints: Using blueprints within the runCli method to pre-configure your WordPress environment exactly how you need it for testing (e.g., setting site titles, creating custom files, installing and activating plugins) before test execution begins.
This functionality opens the door for developers to create fast, reliable, and entirely isolated WordPress testing environments that are essential for modern development workflows.
WordPress Playground Content 2
WordPress Playground Documentation 8