WordPress and the Command Line

Standard

The slides from my talk at NERDSummit, WordPress and the Command Line.

How to use WP-CLI to manage your WordPress site via the command line. From basic management like installing & updating plugins and themes, to scripting a installation workflow, this tool is a WordPress DevOps’ best friend.

A WP-CLI command and grunt task for the Theme Check plugin

Standard

A few months ago I had the idea of creating a wp-cli command for the theme check plugin, and integrating that in with Grunt so that I could use it in my theme build process.

Yesterday I sat down and pulled everything together to do just that.

I’ve modified the existing Theme Check plugin to include a WP-CLI command, and you can grab it on github. If you’re interested, you can also check out the changes I made to create this (as some work had to be done on the plugin directly).

Once you have that version of Theme Check, and can run

wp theme review check <theme-name>

you can also pull down the grunt plugin that integrates with it. Grunt-wp-theme-check is on github and npmjs, and the readme should do a decent job explaining how to use it. Use the following to install it for your project:

npm install grunt-wp-theme-check --save-dev

If you’re still a little lost, you can check out my updated Grunt-Theme-Builder, which explains my process for building and packaging themes. Note that this is just a Gruntfile and package.json, if you want to use it, you’ll need to set up your theme files like I outline, or just copy-paste the tasks you want.

Let me know if you’re using it and if you run into any issues :)