By Tom

WP-CLI Homepage

WP-CLI is one of those tools that I, admittedly, shrugged off when it first came out. That sounds cold or dismissive, but I had my reasons.

The thing is, at the time, I didn’t need it. I was in the process of doing so many things programmatically that I didn’t see a need to learn yet-another-tool that would help me do things that I could already do programmatically.

But then I had a few projects back-to-back-to-back that required some pretty heavy lifting as it related to working with the database. That’s when WP-CLI came into play for me.

And since then, I’ve been a convert. Not just for database operations, but for quickly administering commands that would be far too tedious to script on my own.

Call me stubborn, I guess. But what if you’ve not used WP-CLI? How do you maintain a quick reference to the available commands?

WP-CLI: A Cheatsheet By WebDevStudios

The WP-CLI website has a couple of useful resources available right from the homepage. Specifically, you can check out:

  • The built-in commands
  • The wiki on GitHub

Both of these are solid resources. If you’re an experienced developer, then the wiki is an especially useful resource as it will provide you with what you need to do to build your commands in PHP.

Neat, right?

But back to the question asked at the beginning of the article:

But what if you’ve not used WP-CLI? How do you maintain a quick reference to the available commands?

Though the website offers an authoritative resource, I’ve also found that WebDevStudios‘ cheatsheet to be valuable. You can check it out here.

WP-CLI Cheatsheet

From the repository:

Included in this repo are several files separated by command type. Look at the file named after the command you want to learn.

In the repository, you can find a collection of commands covering things like:

  • General WP-CLI commands
  • Git commands
  • Grunt commands (for those who use the task runner)
  • …and more.

Generally speaking, this is a worthwhile resource to star or to have on hand if you’re doing a lot of work (or even just some work) with WP-CLI as it will save you time when taking care of whatever task you’re working.

If you’ve got other resources for the WP-CLI, feel free to link them up in the comments.

WP-CLI: A Cheatsheet For Commands was written by Tom. For more information about WordPress, development, and resources then visit Tom McFarlin’s blog.

Read more here:: WP-CLI: A Cheatsheet For Commands