Skip to main content

wp site delete

Overview

Permanently remove a subsite, its database tables, and its files from the network. This action is irreversible via the CLI — there is no trash for sites.

Syntax

wp site delete <id> [--yes]

Options

FlagDescription
IDThe ID of the site to delete
--yesSkip confirmation prompt

Basic Usage

wp site delete 3

Output:

Are you sure you want to delete the 'http://example.com/test/' site? [y/n] y
Success: The site at 'http://example.com/test/' was deleted.

Real-World Scenarios

Scenario 1: Cleaning up expired trial sites

# Delete site 15 immediately without asking
wp site delete 15 --yes

Scenario 2: Bulk deleting spam sites

# Assuming you have a list of IDs to remove
for id in 101 102 105; do
wp site delete $id --yes
done

Best Practices

  1. Verify the URL — Always check the ID against wp site list before deleting.
  2. Archive first — If you aren't sure, use wp site update ID --archived=1 instead of deleting.
  3. Backup — Run wp db export before mass deletions.

Next Steps