Skip to content

Feature Request:"studio new" command to create WordPress projects #2491

@juanmaguitar

Description

@juanmaguitar

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-site

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:

  1. Validate project name
  2. Create directory
  3. Call studio site create with the new directory as working path

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions