WP-CLI is fantastically awesome, but did you know it's surprisingly easy to make it even moreso? Come to this session and you'll learn how to write your own WP-CLI commands, while also getting inspired by how we've used it at my agency to really speed up all our custom development work.


Comments are closed.

Jeremy Ward at 15:42 on 24 Aug 2018

Great talk, Ben! I thought this was a good introduction to WP-CLI for devs who maybe haven't worked with it before. A couple of pieces of feedback you might consider including if you give this talk again:

- The 2.0 release of WP-CLI separates the framework from the command bundle so, depending on how a dev installs it (e.g., via Composer), they may wind up with only the framework itself. If they'd like to install the whole bundle of commands via Composer, they can run "composer require wp-cli/wp-cli-bundle"
- You may consider adding a slide about checking for the presence of WP-CLI before using the WP_CLI object within a plugin. As of the 2.0 release, there is a new hook available in WordPress - cli_init, and the classic approach of checking if ( defined( 'WP_CLI' ) && WP_CLI ) is still available.

I'd love to see actual demos of your custom command! I'm looking forward to checking out the talk you linked to in your slides.

Take care!

Learned some new useful things