Automattic / Automattic/studio

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

Open
#2,491 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
517
Forks
95
Avg merge
1d 23h
Merged PRs (30d)
172

Description

## What

Add a top-level `studio new ` command that creates a new directory and sets up a WordPress site in one step.

```bash
studio new my-site
```

This would be equivalent to:

```bash
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:

```bash
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

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing `studio site create` command and how it handles options and working paths. Verify the desired behavior for `studio new `, including name validation, directory creation, and forwarding `--wp`, `--php`, and `--blueprint`; done means a new directory contains the created WordPress site in one command.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.