What Is the WordPress CLI? 18 WP CLI Commands For Devs

Posted by TotalDC

Here 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.

WordPress Commands That Every WordPress Developer Must Know
Download WordPresswp plugin search yoast
Generate wp-config.php filewp core config –dbname=<dbname> –dbuser=<dbuser> –dbpass=<dbpass> –dbprefix=<dbprefix>
Install WordPresswp core install –url=”your domain name” –title=”your blog title” –admin_user=”admin” –admin_password=”your password” –admin_email =”your email”
Search pluginwp plugin search yoast
Install pluginwp plugin install pluginname
List pluginswp plugin list
List installed themeswp theme list
Search for new themeswp theme search keyword
Install themewp theme install theme name
Activate themewp theme install theme name
Edit postwp post edit 1
Post updatewp post update 1 –post_title=”your post title”
Create postswp post create –post status=publish –post_title=”your post title” –edit
Login WordPress dbwp db cli
List WordPress userswp post update 6 –post_author=1
Optimize dbwp db optimize
Update WordPresswp core update-db
Update all pluginswp plugin update –all