ernilambar / database-command
Tool to reset WordPress database. This reset WP database but retains given administrator user account.
Package info
github.com/ernilambar/database-command
Language:Gherkin
Type:wp-cli-package
pkg:composer/ernilambar/database-command
Requires
- php: >=7.2.24 || ^8.0
- wp-cli/wp-cli: ^3.0
Requires (Dev)
- wp-cli/db-command: ^3.0
- wp-cli/entity-command: ^3.0
- wp-cli/role-command: ^3.0
- wp-cli/scaffold-package-command: ^3.0
- wp-cli/wp-cli-tests: ^5.2
This package is auto-updated.
Last update: 2026-08-18 10:01:36 UTC
README
Tool to reset WordPress database. This reset WP database but retains given administrator user account.
Quick links: Using | Installing
Using
wp database reset --author=<username> [--yes]
OPTIONS
--author=<username>
Administrator user you want to keep after reset.
[--yes]
Answer yes to the confirmation message.
EXAMPLES
# Reset database and keep `admin` user.
$ wp database reset --author=admin --yes
Installing
Installing this package requires WP-CLI v3.0 or greater. Update to the latest stable release with wp cli update.
Once you've done so, you can install the latest stable version of this package with:
wp package install ernilambar/database-command:@stable
To install the latest development version of this package, use the following command instead:
wp package install ernilambar/database-command:dev-main
This README.md is generated dynamically from the project's codebase using wp scaffold package-readme (doc). To suggest changes, please submit a pull request against the corresponding part of the codebase.