wiki:wp_cli_commands
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:wp_cli_commands [2020/12/09 14:17] – created antisa | wiki:wp_cli_commands [2024/03/27 10:28] (current) – add Troubleshooting antisa | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Standard WP cli commands ===== | ===== Standard WP cli commands ===== | ||
- | [[wp_cli_install|Install wp cli first]] | + | [[https:// |
+ | One liner: | ||
+ | curl -O https:// | ||
+ | chmod +x wp-cli.phar &&\ | ||
+ | mv wp-cli.phar / | ||
+ | wp --info --allow-root | ||
Below commands are executed by root user hence the flag --allow-root. | Below commands are executed by root user hence the flag --allow-root. | ||
==== Search and replace string in DB ==== | ==== Search and replace string in DB ==== | ||
Line 12: | Line 17: | ||
Replace https:// | Replace https:// | ||
- | wp --path=< | + | wp --path=< |
Same as above but on remote host: | Same as above but on remote host: | ||
- | wp --ssh=user@example.host.com --path=< | + | wp --ssh=user@example.host.com --path=< |
+ | ==== Update home and site url ==== | ||
+ | wp option update home ' | ||
+ | wp option update siteurl ' | ||
+ | |||
+ | ==== Change user's password ==== | ||
+ | wp user update < | ||
+ | |||
+ | ==== Create new admin user ==== | ||
+ | wp user create bob bob@example.com --role=administrator --allow-root | ||
+ | |||
+ | |||
+ | ==== List all plugins ==== | ||
+ | wp plugin list --allow-root | ||
===== Woo commerce orders ===== | ===== Woo commerce orders ===== | ||
Line 31: | Line 49: | ||
+ | ===== Troubleshooting ===== | ||
+ | If the wp cli doesn' | ||
+ | |||
+ | wp --debug plugin list --allow-root --skip-plugins | ||
====== Tested on ====== | ====== Tested on ====== | ||
* Debian 10 | * Debian 10 | ||
Line 37: | Line 59: | ||
====== References ====== | ====== References ====== | ||
- | * | + | * https:// |
- | * | + | * https:// |
+ | * https:// | ||
+ | * https:// | ||
wiki/wp_cli_commands.1607523443.txt.gz · Last modified: 2020/12/09 14:17 by antisa