Skip to content

Conversation

@bcotrim
Copy link
Contributor

@bcotrim bcotrim commented Nov 27, 2025

Related issues

  • N/A

Proposed Changes

  • Add new documentation file docs/testing-with-local-playground.md with step-by-step guide for testing Studio with locally built WordPress Playground packages
  • Update CONTRIBUTING.md to link to the new documentation

Testing Instructions

  • Follow the documentation steps to set up local Playground packages
  • Verify Studio runs with the local packages
  • Make a change to a Playground package and confirm it's reflected in Studio

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@bcotrim bcotrim marked this pull request as draft November 27, 2025 13:32
@bcotrim bcotrim self-assigned this Nov 27, 2025
@wojtekn wojtekn self-requested a review November 27, 2025 13:42
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing 25e8212 vs trunk

site-editor

Metric trunk 25e8212 Diff Change
load 11175.00 ms 9789.00 ms -1386.00 ms 🟢 -12.4%

site-startup

Metric trunk 25e8212 Diff Change
siteCreation 25348.00 ms 24300.00 ms -1048.00 ms 🟢 -4.1%
siteStartup 7016.00 ms 9010.00 ms +1994.00 ms 🔴 28.4%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@Automattic Automattic deleted a comment from Acotin Dec 2, 2025
@Automattic Automattic deleted a comment from Acotin Dec 2, 2025
@Automattic Automattic deleted a comment from Acotin Dec 2, 2025
Copy link
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start! I was able to run dev-mode Playground in Studio, easily modify it, and apply changes in Studio:

[playground-cli] Enabling experimental multi-worker support with 13 workers (CPU cores - 1)
[playground-cli] The fs-ext package is not installed. Internal file locking will not be integrated with host OS file locking.
[playground-cli] Starting a PHP server...
[playground-cli] Starting up workers
[playground-cli] Skipping YOLO SQLite integration plugin setup...
[playground-cli] Booting WordPress...

```json
{
"dependencies": {
"@php-wasm/fs-journal": "file:../wordpress-playground/dist/packages/php-wasm/fs-journal",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it also make sense to reorganize nodes in the package.json to make the replacement easier?

Run this from the wordpress-playground root:

```bash
cd /path/to/wordpress-playground
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we added this script to tools/scripts/ in the Playground repository, and made it available as NPM command in package.json?

@adamziel any thoughts?

npx nx build playground-cli # or other package name
```

2. Restart Studio (type `rs` in the terminal or restart `npm start`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't make the rs command work, and I needed to restart npm start.


To go back to using the published npm packages:

1. Restore the original version numbers in `package.json` (use `git checkout package.json`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to revert package-lock.json, too. In the other case, it kept installing symlinked packages.


## Reverting to npm Packages

To go back to using the published npm packages:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also include instructions showing how to revert changes in Playground repo?

@Automattic Automattic deleted a comment from Acotin Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants