-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
What
Add a top-level studio new <name> command that creates a new directory and sets up a WordPress site in one step.
studio new my-siteThis would be equivalent to:
mkdir my-site && cd my-site && studio site create --name="my-site"Why
Currently, creating a new WordPress project via CLI requires three manual steps:
mkdir my-site # 1. Create empty directory
cd my-site # 2. Navigate into it
studio site create --name="my-site" # 3. Create the siteIf you run studio site create --name="my-site" from a non-empty directory, you get:
✖ The selected directory is not empty nor an existing WordPress site.
This is confusing because the --name flag suggests it might create a directory, but it only sets a display label.
A studio new command would follow the convention established by other frameworks:
laravel new my-projectrails new my-projectcreate-react-app my-projectnpm create vite@latest my-project
Related: #587 (default new site location)
How
Basic usage
studio new my-blog
With options (same as studio site create)
studio new my-site --wp="6.7" --php="8.2" --blueprint="./starter.json"
Implementation could reuse existing studio site create logic:
- Validate project name
- Create directory
- Call
studio site createwith the new directory as working path
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels