Skip to content

Conversation

fellyph
Copy link
Collaborator

@fellyph fellyph commented Jul 7, 2025

Motivation for the change, related issues

Due to the deprecation of the wp-now and the rollout of the new playground CLI(#2224). This pull request updates the references from wp-now to @wp-playground/cli and creates a new page showing how to use the new playground CLI.

Implementation details

  • Updating the main README file
  • Adding a deprecation notice on wp-now page
  • Creating the new Playground CLI page
  • Updating Local Development, Contributor Day, Build and Theme/Plugins for developers pages.

Testing Instructions (or ideally a Blueprint)

  • Download the branch adding-playground-cli-page
  • Install the dependencies
  • Run the command npm run dev:docs
@fellyph fellyph requested a review from a team as a code owner July 7, 2025 17:07
@fellyph fellyph requested a review from adamziel July 7, 2025 17:08
@fellyph fellyph changed the title Adding Playground cli page and removing wp-now references from the documentation [Documentation] Adding Playground cli page and removing wp-now references Jul 7, 2025
@fellyph fellyph changed the title [Documentation] Adding Playground cli page and removing wp-now references [Documentation] Adding Playground CLI page and removing wp-now references Jul 7, 2025
@fellyph fellyph added the [Type] Documentation Improvements or additions to documentation label Jul 7, 2025
Some projects have a specific structure that requires a custom configuration, for example, your repo contains all the files from the `/wp-content/` folder. So this scenario you can specify to the Plaground CLI you will mount your project from that folder using the flag `--mount`.

```bash
npx @wp-playground/cli@latest server --mount=.:/wordpress/wp-content/plugins/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! Just noticing we'll need to coordinate updating this with merging #2281 as that will break some CLI BC.

@adamziel
Copy link
Collaborator

adamziel commented Jul 8, 2025

Nice! Thank you @fellyph. Good direction, I've just left some notes. Btw, are we duplicating the CLI readme with that page? I wonder if there's a way to symlink one to the other perhaps? Or would you say they're distinct?

On Windows, the path format `/host/path:/vfs/path` can cause issues. To resolve this, use the flags `--mount-dir` and `--mount-dir-before-install`. These flags let you specify host and virtual file system paths in an alternative format`"/host/path"` `"/vfs/path"`.
:::

## Command and Arguments
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there something in Docusaurus that would enable us to auto-generate this section? I'm concerned about it getting outdated.

fellyph and others added 5 commits July 11, 2025 10:29
…now.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
…playground-cli.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
…playground-cli.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
…playground-cli.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
…playground-cli.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
@adamziel
Copy link
Collaborator

It seems like there are some build failures

@fellyph
Copy link
Collaborator Author

fellyph commented Jul 14, 2025

@adamziel I have updated the branch, let's see if the CI passes now.

@adamziel
Copy link
Collaborator

It seems like there's still a missing image error

@adamziel
Copy link
Collaborator

When I go to the build job failure details and scroll all the way down, the error says:

 [ERROR] Client bundle compiled with errors therefore further build is impossible. Error: MDX compilation failed for file "/home/runner/work/wordpress-playground/wordpress-playground/packages/docs/site/docs/developers/05-local-development/04-wp-playground-cli.md" Cause: Image docs/developers/05-local-development/_assets/npx-wp-playground-server.gif used in docs/developers/05-local-development/04-wp-playground-cli.md not found. Details: Error: Image docs/developers/05-local-development/_assets/npx-wp-playground-server.gif used in docs/developers/05-local-development/04-wp-playground-cli.md not found. at async Promise.all (index 0) 

The relative path used in packages/docs/site/docs/developers/05-local-development/04-wp-playground-cli.md says ./_assets/npx-wp-playground-server.gif and is pointing to a non-existent file. The actual asset is in ../../blueprints/_assets/npx-wp-playground-server.gif.

@fellyph
Copy link
Collaborator Author

fellyph commented Jul 15, 2025

I have fixed the image address and fixed the issue.

@fellyph
Copy link
Collaborator Author

fellyph commented Jul 15, 2025

I have removed wp-now from the documentation sidebar:

Screenshot 2025-07-15 at 10 58 18
@adamziel adamziel merged commit 62b0990 into trunk Jul 15, 2025
24 of 25 checks passed
@adamziel adamziel deleted the adding-playground-cli-page branch July 15, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Documentation Improvements or additions to documentation

3 participants