wordpress Cheat Sheet
WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installations and much more, without using a web browser.
## Download WordPress
wp core download
## Generate wp-config.php file
wp core config – dbname=<dbname>
--dbuser=<dbuser> – dbpass=<dbpass>
--dbprefix=<dbprefix>
## Install WordPress
wp core install – url="your_domain_name"
--title="Your Blog Title" – admin_user="admin"
--admin_password="your_password"
--admin_email="your_email"
## Search plugin
wp plugin search yoast
## Install plugin
wp plugin install pluginname
## List plugins
wp plugin list
## List installed themes
wp theme list
## Search for new themes
wp theme search keyword
## Install theme
wp theme install bootstrap-four
## Activate theme
wp theme activate bootstrap-four
## List posts
wp post list
## Edit post
wp post edit 1
## Post update
wp post update 1
--post_title="Your New title..."
## Create posts
wp post create
--post_status=publish
--post_title="Second Post"
--edit
## Login WordPress db
wp db cli
## List WordPress users
wp db query "SELECT user_login, ID FROM wp_users;"
## Change WordPress post author
wp post update 6 – post_author=1
## Optimize db
wp db optimize
## Update WordPress
wp core update
## Update WordPress DB
wp core update-db
## Update all plugins
wp plugin update – all