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
| Flag | Description |
|---|---|
ID | The ID of the site to delete |
--yes | Skip 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
- Verify the URL — Always check the ID against
wp site listbefore deleting. - Archive first — If you aren't sure, use
wp site update ID --archived=1instead of deleting. - Backup — Run
wp db exportbefore mass deletions.
Next Steps
wp site empty— clear content without deleting the site.wp site archive— safer alternative.