Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 34 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,114 +4,109 @@ All notable changes to this project are documented in this file by a CI job
that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
format.

## [v3.0.22] (2025-11-17)
## [v3.0.22] (2025-11-17)

### Enhancements


#### Boot Flow

- [Boot] Verify permalink structure is actually set. ([#2902](https://github.com/WordPress/wordpress-playground/pull/2902))
- [Boot] Verify permalink structure is actually set. ([#2902](https://github.com/WordPress/wordpress-playground/pull/2902))

### Blueprints

- V1] Rewrite github.com/owner/repo/raw URLs. ([#2892](https://github.com/WordPress/wordpress-playground/pull/2892))
- V1] Rewrite github.com/owner/repo/raw URLs. ([#2892](https://github.com/WordPress/wordpress-playground/pull/2892))

### Documentation

- Document the new GitHub Preview button action. ([#2893](https://github.com/WordPress/wordpress-playground/pull/2893))
- [Docs] Adding link at the documentation sidebar for PR preview link page. ([#2895](https://github.com/WordPress/wordpress-playground/pull/2895))
- [Docs] Documentation Expansion for php-wasm/node. ([#2780](https://github.com/WordPress/wordpress-playground/pull/2780))
- [Docs] Updating sidebar to add Xdebug pages. ([#2881](https://github.com/WordPress/wordpress-playground/pull/2881))
- Document the new GitHub Preview button action. ([#2893](https://github.com/WordPress/wordpress-playground/pull/2893))
- [Docs] Adding link at the documentation sidebar for PR preview link page. ([#2895](https://github.com/WordPress/wordpress-playground/pull/2895))
- [Docs] Documentation Expansion for php-wasm/node. ([#2780](https://github.com/WordPress/wordpress-playground/pull/2780))
- [Docs] Updating sidebar to add Xdebug pages. ([#2881](https://github.com/WordPress/wordpress-playground/pull/2881))

### PHP WebAssembly

- Try avoiding URL.canParse for older version of Safari. ([#2887](https://github.com/WordPress/wordpress-playground/pull/2887))
- Try avoiding URL.canParse for older version of Safari. ([#2887](https://github.com/WordPress/wordpress-playground/pull/2887))

### Website

- Remove "preview WordPress core branch" feature. ([#2894](https://github.com/WordPress/wordpress-playground/pull/2894))
- Support previewing WordPress and Gutenberg branches, not just PRs. ([#2868](https://github.com/WordPress/wordpress-playground/pull/2868))
- Remove "preview WordPress core branch" feature. ([#2894](https://github.com/WordPress/wordpress-playground/pull/2894))
- Support previewing WordPress and Gutenberg branches, not just PRs. ([#2868](https://github.com/WordPress/wordpress-playground/pull/2868))

### Bug Fixes

- [CLI] Fix null and "latest" WP version resolution and improve unzip error message. ([#2889](https://github.com/WordPress/wordpress-playground/pull/2889))
- [CLI] Fix run-cli leak which was revealed by repeated runCLI() calls during test. ([#2888](https://github.com/WordPress/wordpress-playground/pull/2888))
- [CLI] Fix null and "latest" WP version resolution and improve unzip error message. ([#2889](https://github.com/WordPress/wordpress-playground/pull/2889))
- [CLI] Fix run-cli leak which was revealed by repeated runCLI() calls during test. ([#2888](https://github.com/WordPress/wordpress-playground/pull/2888))

###
###

- CLI] Allow API consumers to rely upon option validation and default values. ([#2883](https://github.com/WordPress/wordpress-playground/pull/2883))
- CLI] Allow API consumers to rely upon option validation and default values. ([#2883](https://github.com/WordPress/wordpress-playground/pull/2883))

### Various

- Minor stylistic and punctuation improvements. ([#2884](https://github.com/WordPress/wordpress-playground/pull/2884))
- Revise error messages and coding guidelines. ([#2879](https://github.com/WordPress/wordpress-playground/pull/2879))
- Update footer labels in localization file. ([#2878](https://github.com/WordPress/wordpress-playground/pull/2878))
- [i18n] Add Japanese translations to Blueprints JSON and the API Client and Mount data. ([#2882](https://github.com/WordPress/wordpress-playground/pull/2882))
- [i18n] Adding Italian translations. ([#2865](https://github.com/WordPress/wordpress-playground/pull/2865))
- [i18n] Create contributor-day-table-lead.md for Gujarati. ([#2866](https://github.com/WordPress/wordpress-playground/pull/2866))
- i18n: Full Translation of "Build" to Spanish. ([#2906](https://github.com/WordPress/wordpress-playground/pull/2906))
- i18n: Minor fixes on web-instance.md Spanish translation. ([#2899](https://github.com/WordPress/wordpress-playground/pull/2899))
- Minor stylistic and punctuation improvements. ([#2884](https://github.com/WordPress/wordpress-playground/pull/2884))
- Revise error messages and coding guidelines. ([#2879](https://github.com/WordPress/wordpress-playground/pull/2879))
- Update footer labels in localization file. ([#2878](https://github.com/WordPress/wordpress-playground/pull/2878))
- [i18n] Add Japanese translations to Blueprints JSON and the API Client and Mount data. ([#2882](https://github.com/WordPress/wordpress-playground/pull/2882))
- [i18n] Adding Italian translations. ([#2865](https://github.com/WordPress/wordpress-playground/pull/2865))
- [i18n] Create contributor-day-table-lead.md for Gujarati. ([#2866](https://github.com/WordPress/wordpress-playground/pull/2866))
- i18n: Full Translation of "Build" to Spanish. ([#2906](https://github.com/WordPress/wordpress-playground/pull/2906))
- i18n: Minor fixes on web-instance.md Spanish translation. ([#2899](https://github.com/WordPress/wordpress-playground/pull/2899))

### Contributors

The following contributors merged PRs in this release:

@adamziel @brandonpayton @fellyph @mehrazmorshed @praful2111 @shimotmk @SirLouen @Successfulsebunya


## [v3.0.21] (2025-11-10)
## [v3.0.21] (2025-11-10)

### Bug Fixes

- Docs: Fix grammar, typos, and formatting issues across documentation. ([#2877](https://github.com/WordPress/wordpress-playground/pull/2877))
- Docs: Fix typo in resources.md. ([#2876](https://github.com/WordPress/wordpress-playground/pull/2876))
- docs: Fix MDN link for Access-Control-Allow-Origin header. ([#2875](https://github.com/WordPress/wordpress-playground/pull/2875))
- Docs: Fix grammar, typos, and formatting issues across documentation. ([#2877](https://github.com/WordPress/wordpress-playground/pull/2877))
- Docs: Fix typo in resources.md. ([#2876](https://github.com/WordPress/wordpress-playground/pull/2876))
- docs: Fix MDN link for Access-Control-Allow-Origin header. ([#2875](https://github.com/WordPress/wordpress-playground/pull/2875))

### Various

- [Docs] Adding ask AI Button. ([#2858](https://github.com/WordPress/wordpress-playground/pull/2858))
- [i18n] Add Japanese translations to Blueprints JSON and the API Client. ([#2873](https://github.com/WordPress/wordpress-playground/pull/2873))
- [Docs] Adding ask AI Button. ([#2858](https://github.com/WordPress/wordpress-playground/pull/2858))
- [i18n] Add Japanese translations to Blueprints JSON and the API Client. ([#2873](https://github.com/WordPress/wordpress-playground/pull/2873))

### Contributors

The following contributors merged PRs in this release:

@fellyph @hmbashar @huzaifaalmesbah @shimotmk


## [v3.0.20] (2025-11-06)
## [v3.0.20] (2025-11-06)

### Enhancements

- [CLI] Add --wordpress-install-mode flag. ([#2803](https://github.com/WordPress/wordpress-playground/pull/2803))
- [CLI] Add --wordpress-install-mode flag. ([#2803](https://github.com/WordPress/wordpress-playground/pull/2803))

### Tools


#### PHP WebAssembly

- [PHP.wasm] Major overhaul of URL rewriting and setting $_SERVER variables. ([#2864](https://github.com/WordPress/wordpress-playground/pull/2864))
- [PHP.wasm] Major overhaul of URL rewriting and setting $\_SERVER variables. ([#2864](https://github.com/WordPress/wordpress-playground/pull/2864))

### PHP WebAssembly

- [PHP.wasm] ImageMagick extension. ([#2834](https://github.com/WordPress/wordpress-playground/pull/2834))
- [PHP.wasm] ImageMagick extension. ([#2834](https://github.com/WordPress/wordpress-playground/pull/2834))

### Bug Fixes

- [CLI] Make messaging clearer for errors and Xdebug IDE integration. ([#2869](https://github.com/WordPress/wordpress-playground/pull/2869))
- [CLI] Make messaging clearer for errors and Xdebug IDE integration. ([#2869](https://github.com/WordPress/wordpress-playground/pull/2869))

### Various

- [Docs] Add xdebug testing page. ([#2840](https://github.com/WordPress/wordpress-playground/pull/2840))
- [Docs] Add xdebug testing page. ([#2840](https://github.com/WordPress/wordpress-playground/pull/2840))

### Contributors

The following contributors merged PRs in this release:

@adamziel @brandonpayton @fellyph


## [v3.0.19] (2025-11-04)

### Enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Blueprint step activatePlugin()', () => {
sqliteIntegrationPluginZip: await getSqliteDriverModule(),
});
php = await handler.getPrimaryPhp();
});
}, 30_000);

afterEach(async () => {
php.exit();
Expand Down
88 changes: 44 additions & 44 deletions packages/playground/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Table of contents

- [Requirements](#requirements)
- [Quickstart](#quickstart)
- [Usage](#usage)
- [Working with Blueprints](#working-with-blueprints)
- [Contributing](#contributing)
- [Requirements](#requirements)
- [Quickstart](#quickstart)
- [Usage](#usage)
- [Working with Blueprints](#working-with-blueprints)
- [Contributing](#contributing)

## Requirements

Expand Down Expand Up @@ -64,41 +64,41 @@ npx @wp-playground/cli@latest server --mount-before-install=./my-local-site:/wor

The `--auto-mount` flag is the easiest way to get started. It inspects the current directory and automatically mounts it to the correct location in the virtual WordPress site. These are the supported directory types and how they are detected:

- **Plugin Mode**: Presence of a PHP file with `Plugin Name:` in its header.
- **Theme Mode**: Presence of a style.css file with `Theme Name:` in its header.
- **wp-content Mode**: Presence of plugins and themes subdirectories.
- **WordPress Mode**: Presence of a complete WordPress installation. The directory will be mounted to the root `/wordpress` folder.
- **Plugin Mode**: Presence of a PHP file with `Plugin Name:` in its header.
- **Theme Mode**: Presence of a style.css file with `Theme Name:` in its header.
- **wp-content Mode**: Presence of plugins and themes subdirectories.
- **WordPress Mode**: Presence of a complete WordPress installation. The directory will be mounted to the root `/wordpress` folder.

## Command and Arguments

Playground CLI is simple, configurable, and unopinionated. You can set it up according
to your unique WordPress setup. With the Playground CLI, you can use the following top-level commands:

- **`server`**: (Default) Starts a local WordPress server.
- **`run-blueprint`**: Executes a Blueprint file without starting a web server.
- **`build-snapshot`**: Builds a ZIP snapshot of a WordPress site based on a Blueprint.
- **`server`**: (Default) Starts a local WordPress server.
- **`run-blueprint`**: Executes a Blueprint file without starting a web server.
- **`build-snapshot`**: Builds a ZIP snapshot of a WordPress site based on a Blueprint.

The `server` command supports the following optional arguments:

- `--port=<port>`: The port number for the server to listen on. Defaults to 9400.
- `--outfile`: When building, write to this output file.
- `--wp=<version>`: The version of WordPress to use. Defaults to the latest.
- `--auto-mount`: Automatically mount the current directory (plugin, theme, wp-content, etc.).
- `--mount=<mapping>`: Manually mount a directory (can be used multiple times). Format: /host/path:/vfs/path
- `--mount-before-install`: Mount a directory to the PHP runtime before WordPress installation (can be used multiple times). Format: `"/host/path:/vfs/path"`.
- `--mount-dir`: Mount a directory to the PHP runtime (can be used multiple times). Format: `"/host/path"` `"/vfs/path"`.
- `--mount-dir-before-install`: Mount a directory before WordPress installation (can be used multiple times). Format: `"/host/path"` `"/vfs/path"`
- `--blueprint=<path>`: The path to a JSON Blueprint file to execute.
- `--blueprint-may-read-adjacent-files`: Consent flag: Allow "bundled" resources in a local blueprint to read files in the same directory as the blueprint file.
- `--login`: Automatically log the user in as an administrator.
- `--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. Other options: `install-from-existing-files` (install using files you've mounted), `install-from-existing-files-if-needed` (same, but skip setup when an existing site is detected), and `do-not-attempt-installing` (never download or install WordPress).
- `--skip-sqlite-setup`: Do not set up the SQLite database integration.
- `--verbosity`: Output logs and progress messages (choices: "quiet", "normal", "debug"). Defaults to "normal".

- `--debug`: Print the PHP error log if an error occurs during boot.
- `--follow-symlinks`: Allow Playground to follow symlinks by automatically mounting symlinked directories and files encountered in mounted directories. ⚠️ Warning: Following symlinks will expose files outside mounted directories to Playground and could be a security risk.
- `--experimental-multi-worker`: Enables experimental multi-worker support. It needs JSPI and a /wordpress directory on a real filesystem. You can pass a positive number to use a specific number of workers, otherwise, it defaults to the number of CPUs minus one.
- `--internal-cookie-store`: Enables Playground's internal cookie handling. When active, Playground uses an HttpCookieStore to manage and persist cookies across requests. If disabled, cookies are handled externally, like by a browser in Node.js.
- `--port=<port>`: The port number for the server to listen on. Defaults to 9400.
- `--outfile`: When building, write to this output file.
- `--wp=<version>`: The version of WordPress to use. Defaults to the latest.
- `--auto-mount`: Automatically mount the current directory (plugin, theme, wp-content, etc.).
- `--mount=<mapping>`: Manually mount a directory (can be used multiple times). Format: /host/path:/vfs/path
- `--mount-before-install`: Mount a directory to the PHP runtime before WordPress installation (can be used multiple times). Format: `"/host/path:/vfs/path"`.
- `--mount-dir`: Mount a directory to the PHP runtime (can be used multiple times). Format: `"/host/path"` `"/vfs/path"`.
- `--mount-dir-before-install`: Mount a directory before WordPress installation (can be used multiple times). Format: `"/host/path"` `"/vfs/path"`
- `--blueprint=<path>`: The path to a JSON Blueprint file to execute.
- `--blueprint-may-read-adjacent-files`: Consent flag: Allow "bundled" resources in a local blueprint to read files in the same directory as the blueprint file.
- `--login`: Automatically log the user in as an administrator.
- `--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. Other options: `install-from-existing-files` (install using files you've mounted), `install-from-existing-files-if-needed` (same, but skip setup when an existing site is detected), and `do-not-attempt-installing` (never download or install WordPress).
- `--skip-sqlite-setup`: Do not set up the SQLite database integration.
- `--verbosity`: Output logs and progress messages (choices: "quiet", "normal", "debug"). Defaults to "normal".

- `--debug`: Print the PHP error log if an error occurs during boot.
- `--follow-symlinks`: Allow Playground to follow symlinks by automatically mounting symlinked directories and files encountered in mounted directories. ⚠️ Warning: Following symlinks will expose files outside mounted directories to Playground and could be a security risk.
- `--experimental-multi-worker`: Enables experimental multi-worker support. It needs JSPI and a /wordpress directory on a real filesystem. You can pass a positive number to use a specific number of workers, otherwise, it defaults to the number of CPUs minus one.
- `--internal-cookie-store`: Enables Playground's internal cookie handling. When active, Playground uses an HttpCookieStore to manage and persist cookies across requests. If disabled, cookies are handled externally, like by a browser in Node.js.

## Need some help with the CLI?

Expand Down Expand Up @@ -165,15 +165,15 @@ cliServer = await runCLI({

### Things the Playground does compared to Laravel Valet

- Handles the entire WordPress installation for you.
- Works across all desktop platforms (Mac, Linux, Windows).
- Does not set up custom host domains for you.
- Handles the entire WordPress installation for you.
- Works across all desktop platforms (Mac, Linux, Windows).
- Does not set up custom host domains for you.

### Things the Playground does compared to `wp-env`

- Does not require Docker.
- Is faster to start up for quick tests and development.
- The Playground doesn't come with a MySQL Server, but you can provide your own MySQL credentials.
- Does not require Docker.
- Is faster to start up for quick tests and development.
- The Playground doesn't come with a MySQL Server, but you can provide your own MySQL credentials.

## Contributing

Expand Down Expand Up @@ -216,10 +216,10 @@ WordPress Playground CLI is an open-source project and welcomes all contributors

Here are a few quick-start guides to get you started:

- Code contributions – see the [developer section](https://wordpress.github.io/wordpress-playground/docs/contributing/code).
- Documentation – see the [documentation section](https://wordpress.github.io/wordpress-playground/docs/contributing/documentation).
- Triage – see the [triage section](https://wordpress.github.io/wordpress-playground/contributing/#triaging-issues).
- Contributions to translations – see the [translations section](https://wordpress.github.io/wordpress-playground/contributing/translations).
- Reporting bugs – open an [issue](https://github.com/WordPress/wordpress-playground/issues/new) in the repository.
- Ideas, designs, or anything else – open a [GitHub discussion](https://github.com/WordPress/wordpress-playground/discussions) and let's talk!
- Join our Slack channel [#playground](https://wordpress.slack.com/archives/C04EWKGDJ0K) at Make WordPress
- Code contributions – see the [developer section](https://wordpress.github.io/wordpress-playground/docs/contributing/code).
- Documentation – see the [documentation section](https://wordpress.github.io/wordpress-playground/docs/contributing/documentation).
- Triage – see the [triage section](https://wordpress.github.io/wordpress-playground/contributing/#triaging-issues).
- Contributions to translations – see the [translations section](https://wordpress.github.io/wordpress-playground/contributing/translations).
- Reporting bugs – open an [issue](https://github.com/WordPress/wordpress-playground/issues/new) in the repository.
- Ideas, designs, or anything else – open a [GitHub discussion](https://github.com/WordPress/wordpress-playground/discussions) and let's talk!
- Join our Slack channel [#playground](https://wordpress.slack.com/archives/C04EWKGDJ0K) at Make WordPress
2 changes: 1 addition & 1 deletion packages/playground/cli/src/is-valid-wordpress-slug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* The version string can be one of the following formats:
* - "latest"
* - "trunk"
* - "nightly"
* - "trunk" (legacy alias: "nightly")
* - "x.y" (x and y are integers) e.g. "6.2"
* - "x.y.z" (x, y and z are integers) e.g. "6.2.1"
* - "x.y.z-betaN" (N is an integer) e.g. "6.2.1-beta1"
Expand Down
Loading