mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-05-01 12:27:46 +08:00
434 B
434 B
wp db
Performs basic database operations using credentials stored in wp-config.php.
EXAMPLES
# Create a new database.
$ wp db create
Success: Database created.
# Drop an existing database.
$ wp db drop --yes
Success: Database dropped.
# Reset the current database.
$ wp db reset --yes
Success: Database reset.
# Execute a SQL query stored in a file.
$ wp db query < debug.sql