WP-CLI
Don’t Fear The Command Line
Agency and Community Success
Manager At Pantheon Since 2014
Some things I enjoy, aside from
tech and improv:
● Comic books and webcomics
● Improv
● Karaoke!!!
Hi, I’m Dwayne
dwayne@pantheon.io
@mcdwayne on Twitter
Slides at: mcdwayne.com
Elastic Hosting
+
Web Development
Tools for Teams
● WordPress Optimized Hosting
● Advanced Caching
● Automated DevOps
● Highly Secure
● Dev, Test, and Live
● Cloud Environments
● Permissions & Security
● Cloud Integration Tools
Poll time
● Do you find yourself doing
the same tasks over and
over in your WordPress
projects?
● Is there a particular way you
set up WordPress for each
new project?
● Is there a common problem
you find yourself fixing for
clients over and over?
https://www.godaddy.com/garage/webpro/wordpress/how-to-use-wp-cli/
Let the robots do the work!
Let the robots do the work!
Let me show you an example
● Install WP-CLI
● Create wp-config.php
● Download WP
● Install WP
● Make some dummy posts https://c9.io/
Before the GUI
There was (is) the terminal
List of commands = script
WordPress Command Line
Interface
Created and maintained by these folks
http://wp-cli.org/
Locally or on server
Things you will need:
Bash
UNIX-like environment (OS X, Linux, FreeBSD or
‘Bash on Ubuntu on Windows’)
SSH Access
PHP 5.3.29 or later
How you install it from the command line:
Download it:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-
pages/phar/wp-cli.phar
Set permissions:
chmod +x wp-cli.phar
Move it somewhere useful:
sudo mv wp-cli.phar /usr/local/bin/wp
Did it work?
Typing
$ wp
in the terminal
should produce this
The hard part is over
● Download and Install Core
● Create wp-config.php
● Search-Replace
● Posts
● Users
● Themes
● Plugins
● Widgets
● Menu
Structure of commands
wp command subcommand --flags
DEMO TIME
https://github.com/1dwaynemcdaniel/Public
Docs/blob/master/WP-CLI-script.sh
http://wp-cli.org/docs/tools/
http://wp-cli.org/docs/commands-cookbook/
WP-CLI Within other CLIs
QUESTION TIME
Pantheon.io
Agency and Community Success
Manager At Pantheon Since 2014
Some things I enjoy, aside from
tech and improv:
● Comic books and webcomics
● Improv
● Karaoke!!!
Hi, I’m Dwayne
dwayne@pantheon.io
@mcdwayne on Twitter
Slides at: mcdwayne.com
Thanks

wp cli- don’t fear the command line