SlideShare a Scribd company logo
@wpengine #WCNYC Terell Moore, Operations Engineer
./WP-CLI
Work faster, not harder.
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
My name is Terell…
Operations Engineer at WP Engine
Support Tech for 2 years, Operations for 1
Uses WP-CLI to manage over 300,000 WordPress sites
WP-CLI saves me valuable time, and allows me to be more efficient
at my job.
A bit about myself
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
A command line interface to manage WordPress sites
Able to be scripted to automate tedious tasks
Extensible, allowing you to build your own commands
What is WP-CLI?
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
Installing WP-CLI
1.Download the wp-cli.phar file
https://raw.githubusercontent.com/wp-
cli/builds/gh-pages/phar/wp-cli.phar
2. Test it out
$ php wp-cli.phar --info
3. Move it to /usr/local/bin/wp & make it executable (Optional)
$ chmod +x wp-cli.phar
$ mv wp-cli.phar /usr/local/bin/wp
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
http://wp-cli.org/commands/
32 built-in commands to assist with managing core WordPress
functionality
Everything from installing a plugin to setting wp_cache values
Built-in WP-CLI commands
@wpengine #WCNYC Terell Moore, Operations Engineer
Automating WP Core
Installation
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
$ wp core download
Downloading WordPress 4.3.1 (en_US)...
Success: WordPress downloaded.
$ wp core config --dbname=wcnyc1 --dbuser=root
Success: Generated wp-config.php file.
$ wp db create
Success: Database created.
$ wp core install --prompt
...
Success: WordPress installed successfully.
Automating WP Core Installation
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
$ wp theme install sydney
Installing Sydney (1.18)
Downloading install package from
https://downloads.wordpress.org/theme/sydney.1.18.zip...
Unpacking the package...
Installing the theme...
Theme installed successfully.
Success: Translations updates are not needed for the 'English (US)' locale.
$ wp theme activate sydney
Success: Switched to 'Sydney' theme.
Automating WP Core Installation
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
Verify that your WordPress core files haven’t been tampered with,
using verify-checksums.
$ wp core verify-checksums
Warning: File doesn't verify against checksum: wp-settings.php
Error: WordPress install doesn't verify against checksums.
Regular WordPress Maintenance
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
Regular WordPress Maintenance
Update all the things. All the time.
$ wp core update
$ wp plugin update --all
$ wp theme update --all
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
Migrate between staging and live
$ wp export
...
Success: All done with export.
$ wp plugin activate wordpress-importer
Success: Plugin 'wordpress-importer'
activated.
$ wp import /path/to.xml --authors=create
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
Community Commands
Built into many popular plugins (Jetpack, W3 Total Cache, etc)
Write your own
Using the commands cookbook, you can write your own
commands
Extending WP-CLI
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook
Each command has it’s own class
Public functions within the class are subcommands
Building your own WP-CLI commands
@wpengine #WCNYC Terell Moore, Operations Engineer
But how does it scale?
How WP Engine uses WP-CLI to support 300,000 WordPress
sites
@wpengine #WCNYC Terell Moore, Operations Engineer
WP-CLI helped WP Engine upgrade 17,000 insecure versions of
Jetpack
Upgrading Jetpack
across 17,000 sites
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
1.A list of all sites with Jetpack installed - easy with WP-CLI!
for i in `ls /nas/wp/www/sites/`;
do echo $i && wp plugin get jetpack --
format=json --fields=name,status,version --
path=/nas/wp/www/sites/$i;
done
Updating Jetpack across 17,000 sites
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
2. Run the update - still easy with WP-CLI!
for i in hhvm wcnyc1 wcnyc2 wcnyc3 wcnyc4;
do wp plugin update jetpack --
path=/nas/wp/www/sites/$i;
done
Updating Jetpack across 17,000 sites
@wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer
What we’ve learned
We can leverage WP-CLI in our existing automation platform
(Ansible) to reach thousands of our servers
Better than dropping-in files using other methods
We can do this with themes, and WordPress core as well
Updating Jetpack across 17,000 sites
@wpengine #WCNYC Terell Moore, Operations Engineer
Live demo
@wpengine #WCNYC Terell Moore, Operations Engineer
Q&A

More Related Content

What's hot

WordPress Management & Marketing Tools
WordPress Management & Marketing ToolsWordPress Management & Marketing Tools
WordPress Management & Marketing Tools
WP Engine
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST API
WP Engine UK
 
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at ScaleWebinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
WP Engine
 
Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap! Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap!
WP Engine
 
WP Engine Customer Inspired: Innovation Showcase
WP Engine Customer Inspired: Innovation ShowcaseWP Engine Customer Inspired: Innovation Showcase
WP Engine Customer Inspired: Innovation Showcase
WP Engine
 
Building and future-proofing your WordPress sites with the Genesis Framework
Building and future-proofing your WordPress sites with the Genesis FrameworkBuilding and future-proofing your WordPress sites with the Genesis Framework
Building and future-proofing your WordPress sites with the Genesis Framework
WP Engine
 
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the ScaleJS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JSFestUA
 
Develop and Deploy Outside the Repo
Develop and Deploy Outside the RepoDevelop and Deploy Outside the Repo
Develop and Deploy Outside the Repo
afragen
 
How WPMaintain Improved Page Speed by 16%
How WPMaintain Improved Page Speed by 16%How WPMaintain Improved Page Speed by 16%
How WPMaintain Improved Page Speed by 16%
WP Engine UK
 
Site Down: How to Triage Those First Minutes
Site Down: How to Triage Those First MinutesSite Down: How to Triage Those First Minutes
Site Down: How to Triage Those First Minutes
John Gamboa
 
Yeoman
YeomanYeoman
10 Things Not To Do With WordPress
10 Things Not To Do With WordPress10 Things Not To Do With WordPress
10 Things Not To Do With WordPress
WordPress Sydney
 
Tipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal EizenbergTipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal Eizenberg
Wix Engineering
 
WordPress in 90 minutes
WordPress in 90 minutesWordPress in 90 minutes
WordPress in 90 minutes
Michelle Castillo
 
Word press in 30 minutes
Word press in 30 minutesWord press in 30 minutes
Word press in 30 minutes
Michelle Castillo
 
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
WordPress Insider Meetup Group - Jan, 7,  2016 meetingWordPress Insider Meetup Group - Jan, 7,  2016 meeting
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
Michelle Castillo
 
10 things Not To Do With WordPress
10 things Not To Do With WordPress10 things Not To Do With WordPress
10 things Not To Do With WordPress
Ricky Blacker
 
Maintaining Retainers as a WordPress Developer
Maintaining Retainers as a WordPress DeveloperMaintaining Retainers as a WordPress Developer
Maintaining Retainers as a WordPress Developer
DevinVinson
 
Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016
Mario Peshev
 
Introduction to WordPress REST API
Introduction to WordPress REST APIIntroduction to WordPress REST API
Introduction to WordPress REST API
Simone D'Amico
 

What's hot (20)

WordPress Management & Marketing Tools
WordPress Management & Marketing ToolsWordPress Management & Marketing Tools
WordPress Management & Marketing Tools
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST API
 
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at ScaleWebinar: Myths, Mistakes and Management of WooCommerce at Scale
Webinar: Myths, Mistakes and Management of WooCommerce at Scale
 
Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap! Webinar: You Are Too Cheap!
Webinar: You Are Too Cheap!
 
WP Engine Customer Inspired: Innovation Showcase
WP Engine Customer Inspired: Innovation ShowcaseWP Engine Customer Inspired: Innovation Showcase
WP Engine Customer Inspired: Innovation Showcase
 
Building and future-proofing your WordPress sites with the Genesis Framework
Building and future-proofing your WordPress sites with the Genesis FrameworkBuilding and future-proofing your WordPress sites with the Genesis Framework
Building and future-proofing your WordPress sites with the Genesis Framework
 
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the ScaleJS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
JS Fest 2019/Autumn. Eyal Eizenberg. Tipping the Scale
 
Develop and Deploy Outside the Repo
Develop and Deploy Outside the RepoDevelop and Deploy Outside the Repo
Develop and Deploy Outside the Repo
 
How WPMaintain Improved Page Speed by 16%
How WPMaintain Improved Page Speed by 16%How WPMaintain Improved Page Speed by 16%
How WPMaintain Improved Page Speed by 16%
 
Site Down: How to Triage Those First Minutes
Site Down: How to Triage Those First MinutesSite Down: How to Triage Those First Minutes
Site Down: How to Triage Those First Minutes
 
Yeoman
YeomanYeoman
Yeoman
 
10 Things Not To Do With WordPress
10 Things Not To Do With WordPress10 Things Not To Do With WordPress
10 Things Not To Do With WordPress
 
Tipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal EizenbergTipping the Scale - Eyal Eizenberg
Tipping the Scale - Eyal Eizenberg
 
WordPress in 90 minutes
WordPress in 90 minutesWordPress in 90 minutes
WordPress in 90 minutes
 
Word press in 30 minutes
Word press in 30 minutesWord press in 30 minutes
Word press in 30 minutes
 
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
WordPress Insider Meetup Group - Jan, 7,  2016 meetingWordPress Insider Meetup Group - Jan, 7,  2016 meeting
WordPress Insider Meetup Group - Jan, 7, 2016 meeting
 
10 things Not To Do With WordPress
10 things Not To Do With WordPress10 things Not To Do With WordPress
10 things Not To Do With WordPress
 
Maintaining Retainers as a WordPress Developer
Maintaining Retainers as a WordPress DeveloperMaintaining Retainers as a WordPress Developer
Maintaining Retainers as a WordPress Developer
 
Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016
 
Introduction to WordPress REST API
Introduction to WordPress REST APIIntroduction to WordPress REST API
Introduction to WordPress REST API
 

Similar to WP-CLI: WordCamp NYC 2015

WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016
Terell Moore
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
WP Engine
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Andrea Cardinali
 
WordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersWordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for Beginners
Stewart Ritchie
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
WP Engine
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
David Lukac
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
Michaël Perrin
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 
Advanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comAdvanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.com
InstaWP Inc
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short Tutorial
Christos Zigkolis
 
Remote Control WordPress
Remote Control WordPressRemote Control WordPress
Remote Control WordPress
Edmund Turbin
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
Jeroen van Dijk
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The Win
Micah Wood
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLI
James Collins
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
Diana Thompson
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
Docker, developers take power
Docker, developers take powerDocker, developers take power
Docker, developers take power
Enalean
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
Suwash Kunwar
 
Session: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from ScratchSession: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from Scratch
Roald Umandal
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
Outlyer
 

Similar to WP-CLI: WordCamp NYC 2015 (20)

WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016WP-CLI: WordCamp Nashville 2016
WP-CLI: WordCamp Nashville 2016
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
 
WordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersWordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for Beginners
 
The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Advanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.comAdvanced WordPress Tooling: By InstaWP.com
Advanced WordPress Tooling: By InstaWP.com
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short Tutorial
 
Remote Control WordPress
Remote Control WordPressRemote Control WordPress
Remote Control WordPress
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The Win
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLI
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
Docker, developers take power
Docker, developers take powerDocker, developers take power
Docker, developers take power
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
Session: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from ScratchSession: WP Site Management using WP-CLI from Scratch
Session: WP Site Management using WP-CLI from Scratch
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
 

Recently uploaded

Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptxDraya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
ashishkumarrana9
 
Dewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show caseDewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show case
DEWANSTUDIO.COM
 
2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage
Zsolt Nemeth
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
shamrisumri
 
6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App
VPN Server
 
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
ffg01100
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
ffg01100
 
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdfHow-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
Dolphin Data Lab
 
Book dating , international dating phgra
Book dating , international dating phgraBook dating , international dating phgra
Book dating , international dating phgra
thomaskurtha9
 
workbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdfworkbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdf
anya2024forgya
 
Tarun Gaur On Data Breaches and Privacy Fears
Tarun Gaur On Data Breaches and Privacy FearsTarun Gaur On Data Breaches and Privacy Fears
Tarun Gaur On Data Breaches and Privacy Fears
Tarun Gaur
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
byubyu7
 
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaipromInformation Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
TanapatLimsaiprom1
 
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
shamrisumri
 
Effective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptxEffective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptx
AirtoryInc
 
AWS Networking Basic , tanapat limsaiprom
AWS Networking Basic , tanapat limsaipromAWS Networking Basic , tanapat limsaiprom
AWS Networking Basic , tanapat limsaiprom
ธนาพัฒน์ ลิ้มสายพรหม
 
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
elbertablack
 
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
mahigarg2024#G05
 
Build a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat LimsaipromBuild a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat Limsaiprom
TanapatLimsaiprom1
 
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirtsJarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
exgf28
 

Recently uploaded (20)

Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptxDraya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
Draya Michele’s Son – Kniko Howard’s Rise to Fame.pptx
 
Dewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show caseDewanstudio Project Portfolio 2023 show case
Dewanstudio Project Portfolio 2023 show case
 
2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage
 
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
High Profile Girls Call ServiCe Chennai XX00XXX00X Tanisha Best High Class Ch...
 
6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App6 Reasons to Use a VPN | 3S VPN Server App
6 Reasons to Use a VPN | 3S VPN Server App
 
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
 
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
202254.com香蕉影视,在线观看《我才不要和你做朋友呢》在线观看最新电影,香蕉影视在线观看《我才不要和你做朋友呢》在线观看高清电影
 
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdfHow-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
How-to-Diagnose-Hard-Drives-by-DFL-DDP-2024.pdf
 
Book dating , international dating phgra
Book dating , international dating phgraBook dating , international dating phgra
Book dating , international dating phgra
 
workbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdfworkbook and project U5 1ºsecundaria.pdf
workbook and project U5 1ºsecundaria.pdf
 
Tarun Gaur On Data Breaches and Privacy Fears
Tarun Gaur On Data Breaches and Privacy FearsTarun Gaur On Data Breaches and Privacy Fears
Tarun Gaur On Data Breaches and Privacy Fears
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
 
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaipromInformation Systems Auditing, Controls and Assurance , tanapat limsaiprom
Information Systems Auditing, Controls and Assurance , tanapat limsaiprom
 
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
@Girls @Call Chennai 🛬 XXXXXXXXXX 🛬 available 24*7 cash payment book now pay ...
 
Effective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptxEffective Tips for Creating the Best Rich Media Ads .pptx
Effective Tips for Creating the Best Rich Media Ads .pptx
 
AWS Networking Basic , tanapat limsaiprom
AWS Networking Basic , tanapat limsaipromAWS Networking Basic , tanapat limsaiprom
AWS Networking Basic , tanapat limsaiprom
 
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
Female Service Girls Call Delhi 9873940964 Provide Best And Top Girl Service ...
 
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
Girls Call Mahipalpur 000XX00000 Provide Best And Top Girl Service And No1 in...
 
Build a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat LimsaipromBuild a Professional Resume using Canva , Tanapat Limsaiprom
Build a Professional Resume using Canva , Tanapat Limsaiprom
 
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirtsJarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
 

WP-CLI: WordCamp NYC 2015

  • 1. @wpengine #WCNYC Terell Moore, Operations Engineer ./WP-CLI Work faster, not harder.
  • 2. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer My name is Terell… Operations Engineer at WP Engine Support Tech for 2 years, Operations for 1 Uses WP-CLI to manage over 300,000 WordPress sites WP-CLI saves me valuable time, and allows me to be more efficient at my job. A bit about myself
  • 3. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer A command line interface to manage WordPress sites Able to be scripted to automate tedious tasks Extensible, allowing you to build your own commands What is WP-CLI?
  • 4. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer Installing WP-CLI 1.Download the wp-cli.phar file https://raw.githubusercontent.com/wp- cli/builds/gh-pages/phar/wp-cli.phar 2. Test it out $ php wp-cli.phar --info 3. Move it to /usr/local/bin/wp & make it executable (Optional) $ chmod +x wp-cli.phar $ mv wp-cli.phar /usr/local/bin/wp
  • 5. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer http://wp-cli.org/commands/ 32 built-in commands to assist with managing core WordPress functionality Everything from installing a plugin to setting wp_cache values Built-in WP-CLI commands
  • 6. @wpengine #WCNYC Terell Moore, Operations Engineer Automating WP Core Installation
  • 7. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer $ wp core download Downloading WordPress 4.3.1 (en_US)... Success: WordPress downloaded. $ wp core config --dbname=wcnyc1 --dbuser=root Success: Generated wp-config.php file. $ wp db create Success: Database created. $ wp core install --prompt ... Success: WordPress installed successfully. Automating WP Core Installation
  • 8. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer $ wp theme install sydney Installing Sydney (1.18) Downloading install package from https://downloads.wordpress.org/theme/sydney.1.18.zip... Unpacking the package... Installing the theme... Theme installed successfully. Success: Translations updates are not needed for the 'English (US)' locale. $ wp theme activate sydney Success: Switched to 'Sydney' theme. Automating WP Core Installation
  • 9. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer Verify that your WordPress core files haven’t been tampered with, using verify-checksums. $ wp core verify-checksums Warning: File doesn't verify against checksum: wp-settings.php Error: WordPress install doesn't verify against checksums. Regular WordPress Maintenance
  • 10. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer Regular WordPress Maintenance Update all the things. All the time. $ wp core update $ wp plugin update --all $ wp theme update --all
  • 11. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer Migrate between staging and live $ wp export ... Success: All done with export. $ wp plugin activate wordpress-importer Success: Plugin 'wordpress-importer' activated. $ wp import /path/to.xml --authors=create
  • 12. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer Community Commands Built into many popular plugins (Jetpack, W3 Total Cache, etc) Write your own Using the commands cookbook, you can write your own commands Extending WP-CLI
  • 13. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook Each command has it’s own class Public functions within the class are subcommands Building your own WP-CLI commands
  • 14. @wpengine #WCNYC Terell Moore, Operations Engineer But how does it scale? How WP Engine uses WP-CLI to support 300,000 WordPress sites
  • 15. @wpengine #WCNYC Terell Moore, Operations Engineer WP-CLI helped WP Engine upgrade 17,000 insecure versions of Jetpack Upgrading Jetpack across 17,000 sites
  • 16. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer 1.A list of all sites with Jetpack installed - easy with WP-CLI! for i in `ls /nas/wp/www/sites/`; do echo $i && wp plugin get jetpack -- format=json --fields=name,status,version -- path=/nas/wp/www/sites/$i; done Updating Jetpack across 17,000 sites
  • 17. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer 2. Run the update - still easy with WP-CLI! for i in hhvm wcnyc1 wcnyc2 wcnyc3 wcnyc4; do wp plugin update jetpack -- path=/nas/wp/www/sites/$i; done Updating Jetpack across 17,000 sites
  • 18. @wpengine #WCNYC Terell Moore, Operations Engineer@wpengine #WCNYC Terell Moore, Operations Engineer What we’ve learned We can leverage WP-CLI in our existing automation platform (Ansible) to reach thousands of our servers Better than dropping-in files using other methods We can do this with themes, and WordPress core as well Updating Jetpack across 17,000 sites
  • 19. @wpengine #WCNYC Terell Moore, Operations Engineer Live demo
  • 20. @wpengine #WCNYC Terell Moore, Operations Engineer Q&A

Editor's Notes

  1. Roles & Capabilities Installing WP core Verify checksums Multisite Child theme underscores