Run WordPress directly from the JavaScript code with runCLI

Run WordPress directly from the JavaScript code with runCLI

Published

October 22, 2025

This video demonstrates a powerful development feature of the WordPress Playground: the ability to launch a full WordPress instance directly within a Node.js/TypeScript environment using the runCli from the @wp-playground/cli package.
Automattic’s Fellyph shows how developers can use this tool not only for simple preview environments, but also for advanced automation, especially End-to-End (E2E) testing.
What you will learn:
Programmatic WordPress Instances: How to import and use the @wp-playground/cli package to run an entire WordPress server directly from your TypeScript application.
Custom configuration: Specify the required PHP versions (e.g. 8.3) and WordPress versions.
E2E Testing with Playwright: Set up a robust testing workflow using the Playground CLI in conjunction with Playwright to ensure your plugins and features work as expected.
The Power of Blueprints: Use blueprints within the runCli method to configure your WordPress environment exactly as 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 fully isolated WordPress testing environments that are essential for modern development workflows.

Event

WordPress Playground Content 1

Speakers

Fellyph Cintra 20

Language

English 11307

Download
Subtitles

Subtitle this video →

Producer

#Run #WordPress #JavaScript #code #runCLI

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *