wp cli- don’t fear the command line
-
Upload
dwayne-mcdaniel -
Category
Software
-
view
42 -
download
1
Transcript of wp cli- don’t fear the command line
![Page 1: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/1.jpg)
WP-CLIDon’t Fear The Command Line
![Page 2: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/2.jpg)
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
@mcdwayne on Twitter
Slides at: mcdwayne.com
![Page 3: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/3.jpg)
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
![Page 4: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/4.jpg)
Poll time
![Page 5: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/5.jpg)
![Page 6: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/6.jpg)
![Page 7: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/7.jpg)
● 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/
![Page 8: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/8.jpg)
Let the robots do the work!
![Page 9: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/9.jpg)
Let the robots do the work!
![Page 10: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/10.jpg)
Let me show you an example● Install WP-CLI● Create wp-config.php● Download WP● Install WP● Make some dummy posts https://c9.io/
![Page 12: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/12.jpg)
![Page 13: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/13.jpg)
Before the GUI
![Page 14: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/14.jpg)
There was (is) the terminal
![Page 15: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/15.jpg)
List of commands = script
![Page 16: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/16.jpg)
WordPress Command Line Interface
![Page 17: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/17.jpg)
Created and maintained by these folks
![Page 18: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/18.jpg)
http://wp-cli.org/
![Page 19: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/19.jpg)
![Page 20: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/20.jpg)
Locally or on server
![Page 21: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/21.jpg)
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
![Page 22: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/22.jpg)
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
![Page 23: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/23.jpg)
Did it work? Typing $ wpin the terminalshould produce this
![Page 24: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/24.jpg)
The hard part is over
![Page 25: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/25.jpg)
![Page 26: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/26.jpg)
● Download and Install Core● Create wp-config.php● Search-Replace● Posts● Users● Themes● Plugins● Widgets● Menu
![Page 27: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/27.jpg)
Structure of commands
wp command subcommand --flags
![Page 28: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/28.jpg)
DEMO TIMEhttps://github.com/1dwaynemcdaniel/Public
Docs/blob/master/WP-CLI-script.sh
![Page 29: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/29.jpg)
http://wp-cli.org/docs/tools/http://wp-cli.org/docs/commands-cookbook/
![Page 30: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/30.jpg)
WP-CLI Within other CLIs
![Page 31: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/31.jpg)
QUESTION TIME
![Page 32: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/32.jpg)
Pantheon.io
![Page 33: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/33.jpg)
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
@mcdwayne on Twitter
Slides at: mcdwayne.com
![Page 34: wp cli- don’t fear the command line](https://reader031.fdocuments.in/reader031/viewer/2022021814/58eed1cd1a28ab8b678b45a3/html5/thumbnails/34.jpg)
Thanks