WordPress on the CLI – Interact, Explore, Automate.

Like many environments, WordPress can be a bit cumbersome to work with when you’re locked into using the GUI that is provided, when there is so much more that can be done on via a Command Line Interface (CLI.) To truly unlock the full power of the WordPress API, having a sense for how to work with it via CLI is the key to success.

I will provide guidance on: how to create CLI scripts in PHP, using a bare-bones example to start and then incorporating the wp-cli framework; using Perl/Shell Scripts to manage and harness WordPress CLI scripts; how to explore and experiment with the WordPress API through ctags and the WordPress shell. I will also demonstrate some higher-level issues with working with WordPress on the command line. I’ll cover how you can use the skills developed to work with giant data files, and discuss the caveats of importing and exporting large data sets.