WP-CLI

WP-CLI

It’s typical… you spend ages writing scripts to manage WordPress installations… take a long time finding ways to detect if things need updating, looking for security holes etc.  Then, months later after refining your scripts to perfection, you come across a tool that is perfect for the job and does much more besides.  DOH!

Why didn’t I discover the marvellous wp-cli before?

It’s easy to install, and then you have the following commands available to you.  It’s also easy to extend the command set – there’s loads of community provided examples on the home page.

Command Description
cache Manage the object cache.
cap Manage user capabilities.
cli Get information about WP-CLI itself.
comment Manage comments.
comment-meta Manage comment custom fields.
core Download, install, update and otherwise manage WordPress proper.
db Perform basic database operations.
eval Execute arbitrary PHP code after loading WordPress.
eval-file Load and execute a PHP file after loading WordPress.
export Export content to a WXR file.
help Get help on a certain command.
import Import content from a WXR file.
media Manage attachments.
network-meta Manage network custom fields.
option Manage options.
plugin Manage plugins.
post Manage posts.
post-meta Manage post custom fields.
rewrite Manage rewrite rules.
role Manage user roles.
scaffold Generate code for post types, taxonomies, etc.
search-replace Search/replace strings in the database.
shell Interactive PHP console.
site Perform site-wide operations.
term Manage terms.
theme Manage themes.
transient Manage transients.
user Manage users.
user-meta Manage user custom fields.

Submit a Comment

Your email address will not be published.