WP-CLI

A command line interface for WordPress

Commands » site

wp site - Perform site-wide operations.

Quick links: Github issues


EXAMPLES

# Create site
$ wp site create --slug=example
Success: Site 3 created: www.example.com/example/

# Output a simple list of site URLs
$ wp site list --field=url
http://www.example.com/
http://www.example.com/subdir/

# Delete site
$ wp site delete 123
Are you sure you want to delete the 'http://www.example.com/example' site? [y/n] y
Success: The site at 'http://www.example.com/example' was deleted.

SUBCOMMANDS

Name Description
activate Activate one or more sites.
archive Archive one or more sites.
create Create a site in a multisite install.
deactivate Deactivate one or more sites.
delete Delete a site in a multisite install.
empty Empty a site of its content (posts, comments, terms, and meta).
list List all sites in a multisite install.
option Manage site options in a multisite install.
spam Mark one or more sites as spam.
unarchive Unarchive one or more sites.
unspam Remove one or more sites from spam.