What
Add a top-level studio new <name> command that creates a new directory and sets up a WordPress site in one step.
This 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 site
If 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-project
rails new my-project
create-react-app my-project
npm 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 create with the new directory as working path
What
Add a top-level
studio new <name>command that creates a new directory and sets up a WordPress site in one step.This would be equivalent to:
Why
Currently, creating a new WordPress project via CLI requires three manual steps:
If you run
studio site create --name="my-site"from a non-empty directory, you get:This is confusing because the
--nameflag suggests it might create a directory, but it only sets a display label.A
studio newcommand would follow the convention established by other frameworks:laravel new my-projectrails new my-projectcreate-react-app my-projectnpm create vite@latest my-projectRelated: #587 (default new site location)
How
Basic usage
studio new my-blog
With options (same as studio site create)
Implementation could reuse existing
studio site createlogic:studio site createwith the new directory as working path