What Is the WordPress CLI? 18 WP CLI Commands For Devs
Posted by TotalDCHere you will find out what is WordPress CLI and learn 18 WordPress CLI commands that every WordPress developer must know.
What Is WordPress CLI?
So what is WordPress CLI? WordPress CLI is a tool that gives you the ability to admin your WordPress website through a command line. You can execute standard functions like plugin installation or commands that are not supported through the standard WP backend.
Download WordPress | wp plugin search yoast |
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 theme name |
Activate theme | wp theme install theme name |
Edit post | wp post edit 1 |
Post update | wp post update 1 –post_title=”your post title” |
Create posts | wp post create –post status=publish –post_title=”your post title” –edit |
Login WordPress db | wp db cli |
List WordPress users | wp post update 6 –post_author=1 |
Optimize db | wp db optimize |
Update WordPress | wp core update-db |
Update all plugins | wp plugin update –all |