One liner:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &&\ chmod +x wp-cli.phar &&\ mv wp-cli.phar /usr/local/bin/wp &&\ wp --info --allow-root
Below commands are executed by root user hence the flag –allow-root.
Replace https://example.com with https://example.org:
wp --path=<wp installation> search-replace 'https://example.com' 'https://example.org' --skip-columns=guid --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' --skip-columns=guid --all-tables --allow-root
wp option update home 'http://example.com' wp option update siteurl 'http://example.com'
wp user update <username> --prompt=user_pass --allow-root
wp user create bob bob@example.com --role=administrator --allow-root
wp plugin list --allow-root
wp wc shop_order list --path=<wp installation> --allow-root --user=<user> --format=csv
wp wc shop_order get <id> --path=<wp installation> --allow-root --user=<user>
If the wp cli doesn't output anything, try using –skip-plugins
options
wp --debug plugin list --allow-root --skip-plugins