31
Introduction To The WP-CLI The why, the what and the how

Wp cli- intro and basics

Embed Size (px)

Citation preview

Introduction To The WP-CLIThe why, the what and the how

Pantheon.io

Agency and Community Success Manager At Pantheon Since 2014

[email protected]

mcdwayne.com

Some things I enjoy, aside from tech:● Improv ● Comic books● Karaoke!!!

Hi, I’m Dwayne

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

Pantheon.io

Yes, cable cars are right outside

● 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 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:

UNIX-like environment (OS X, Linux, FreeBSD)

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 $ wpin the terminalshould 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 TIMEhttps://github.com/1dwaynemcdaniel/Public

Docs/blob/master/WP-CLI-script.sh

WP-CLI Within other CLIs

QUESTION TIME

Pantheon.io

Agency and Community Success Manager At Pantheon Since 2014

San Francisco Based Improv Actor And Producer Since Beginning of 2010

[email protected] @mcdwayne on Twitter Blog

Some things I enjoy, aside from tech and improv: ● Comic books● Karaoke!!!

Thanks, again I’m Dwayne

Thanks