Tutorial by Examples

Get a list of themes. $ wp theme list Install the latest version from wordpress.org and activate $ wp theme install twentysixteen --activate Install from a local zip file $ wp theme install ../my-theme.zip Install from a remote zip file $ wp theme install http://s3.amazonaws.com/bucketn...
Get a list of plugins $ wp plugin list List active plugins on the site. $ wp plugin list --status=active --format=json List plugins on each site in a network. $ wp site list --field=url | xargs -I % wp plugin list --url=% Activate plugin $ wp plugin activate hello-dolly Deactivate p...
Display the version currently installed. $ wp cli version Check for updates to WP-CLI. $ wp cli check-update Update WP-CLI to the latest stable release. $ wp cli update List all available aliases. $ wp cli alias Print various details about the WP-CLI environment. $ wp cli info Du...
Download WordPress core $ wp core download --locale=nl_NL Install WordPress $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword [email protected] Display the WordPress version $ wp core version Transform a single-site i...
List user IDs $ wp user list --field=ID Create a new user. $ wp user create bob [email protected] --role=author Update an existing user. $ wp user update 123 --display_name=Mary --user_pass=marypass Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567
Create a new database. $ wp db create Drop an existing database. $ wp db drop --yes Reset the current database. $ wp db reset --yes Execute a SQL query stored in a file. $ wp db query < debug.sql

Page 1 of 1