Informational
Manipulation
# Execute a query stored in a file $ wp db query < debug.sql # Execute a query from prompt $ wp db query '<query>' |
DB FunctionsThis sheet is a quick reference of the commands available to operate with and manipulate within a Wordpress database using .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 |
Operations
Quick Help
This will provide further options and parameters available for the command and subcommand specified. The technique is applicable throughout the wp-cli. |
Cheatography
https://cheatography.com
WP-CLI Database Functions Cheat Sheet by wirehead
Database functions for the Wordpress command line interface
Created By
Metadata
Favourited By
Comments
tripdog, 21:44 29 Mar 22
Very useful!
Add a Comment
Related Cheat Sheets