Skip to main content

wp site create

Overview

Add a new site to your multisite network instantly. This command handles creating the database tables for the subsite and registering it in the wp_blogs table.

Syntax

wp site create --slug=<slug> [--title=<title>] [--email=<email>] [--network_id=<id>] [--private] [--porcelain]

Options

FlagDescription
--slug=SLUGThe path or subdomain for the new site
--title=TITLEThe title for the new site (default: slug)
--email=EMAILEmail address for the site administrator
--network_id=IDThe ID of the network to create the site on
--privateSet the site as private
--porcelainOutput only the new site ID

Basic Usage

Create a subdirectory site

wp site create --slug=marketing --title="Marketing Blog" --email=marketing@example.com

Output:

Success: Site 2 created: http://example.com/marketing/

Create a subdomain site

wp site create --slug=shop --title="Online Store"

Output:

Success: Site 3 created: http://shop.example.com/

Real-World Scenarios

Scenario 1: Provisioning sites for new clients

SITE_ID=$(wp site create --slug=client-alpha --porcelain)
wp user create client_admin admin@clientalpha.com --role=administrator --url=example.com/client-alpha
echo "New site created with ID: $SITE_ID"

Scenario 2: Creating a Private Staging Site

wp site create --slug=dev-test --title="Internal Staging" --private

Quick Reference

wp site create --slug=news --title="Recent News"
wp site create --slug=test --porcelain # Get only the ID

Next Steps