Skip to content

Add develop mode to Playground CLI#3204

Open
jonathanbossenger wants to merge 4 commits intoWordPress:trunkfrom
jonathanbossenger:develop-mode
Open

Add develop mode to Playground CLI#3204
jonathanbossenger wants to merge 4 commits intoWordPress:trunkfrom
jonathanbossenger:develop-mode

Conversation

@jonathanbossenger
Copy link
Collaborator

Motivation for the change, related issues

Adds a new --develop (alias --dev) argument to the Playground CLI, which launches Playground with an opinionated set of defaults for a local development environment:

  • Mounts a local directory, and installs the WordPress files in that directory if needed
  • Implements the SQLite Database Integration drop-in. This is required for WP CLI commands to work on the Playground instance
  • Automatically enables all WP Debug constants

Along with #3203 this allows developers to mix and match their local development requirements easily, eg:

playground-cli server --dev /path/to/new-site -x

Which would start the local development environment with Xdebug enabled

Testing Instructions

With WP CLI already installed:

  • Create a new local directory with WordPress installation files wp core download --path=/path/to/new-site
  • Start the playground cli server with the develop option and pass it the path to the WordPress installation: playground-cli server --dev /path/to/new-site or playground-cli server --develop /path/to/new-site
  • Check that you can run WP CLI commands from the new directory (eg wp plugin list)
  • Create an empty site directory `mkdir /path/to/new-site' then start the playground CLI server with the develop option and make sure it installs the WordPress files, and WP CLI works.

Copilot AI and others added 4 commits January 28, 2026 07:16
Co-authored-by: jonathanbossenger <180629+jonathanbossenger@users.noreply.github.com>
…ivation, add auto-mount conflict validation

Co-authored-by: jonathanbossenger <180629+jonathanbossenger@users.noreply.github.com>
…de-option

Add --develop mode to Playground CLI for streamlined WordPress development
@adamziel
Copy link
Collaborator

adamziel commented Jan 28, 2026

Would it make sense to merge this into the start command? That one is also an opinionated set of defaults. We could alias it as dev for this usage:

playground-cli dev /path/to/new-site -x

@jonathanbossenger
Copy link
Collaborator Author

jonathanbossenger commented Jan 29, 2026

Would it make sense to merge this into the start command?

I was not aware there was a start command. I will look into it and see if it makes sense to simply merge them there.

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