WordPress WP-CLI 2 · Database

Empty the database

Delete all tables in the database.

wp db reset --yes

Caution: Deletes every table and all content. --yes skips the confirmation prompt.

Official WordPress WP-CLI 2 documentation

More database commands

All database commands · WordPress WP-CLI 2 cheatsheet

Was this page helpful?