wiki:wp_cli_commands
This is an old revision of the document!
Table of Contents
WP cli commands
Standard WP cli commands
Below commands are executed by root user hence the flag –allow-root.
Search and replace string in DB
Replace https://example.com with https://example.org:
wp --path=<wp installation> search-replace 'https://example.com' 'https://example.org' --all-tables --allow-root
Same as above but on remote host:
wp --ssh=user@example.host.com --path=<wp installation> search-replace 'https://example.com' 'https://example.org' --all-tables --allow-root
Change user's password
wp user update <username> --prompt=user_pass --allow-root
Woo commerce orders
List all orders in csv format
wp wc shop_order list --path=<wp installation> --allow-root --user=<user> --format=csv
Get order details
wp wc shop_order get <id> --path=<wp installation> --allow-root --user=<user>
Tested on
- Debian 10
See also
References
wiki/wp_cli_commands.1643461546.txt.gz · Last modified: 2022/01/29 13:05 by antisa