Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to WP-CLI
Search
Kyle B. Johnson
November 02, 2017
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to WP-CLI
Kyle B. Johnson
November 02, 2017
More Decks by Kyle B. Johnson
See All by Kyle B. Johnson
Continuously Delivering Value
kjohnson
0
150
Building Pages in WordPress
kjohnson
0
200
Gutenberg
kjohnson
0
390
Separate your time from your income
kjohnson
0
500
iThemes Exchange
kjohnson
0
140
Easy Digital Downloads
kjohnson
0
86
PHP Templating
kjohnson
0
1.2k
WordPress Taxonomies
kjohnson
0
94
objects-a-short-intro.pdf
kjohnson
0
200
Other Decks in Programming
See All in Programming
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
110
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
170
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
400
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
160
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
250
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
430
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
0
110
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
200
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.4k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
190
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Fireside Chat
paigeccino
43
4.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
340
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
Typedesign – Prime Four
hannesfritz
42
3.2k
Designing for Timeless Needs
cassininazir
1
540
The Cost Of JavaScript in 2023
addyosmani
55
10k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
650
Transcript
The command line interface for WordPress_ ./WP-CLI
$ wp plugin install ninja-forms Installing Ninja Forms (3.0) Downloading
install package... Unpacking the package... Installing the plugin... Plugin installed successfully. Success: Installed 1 of 1 plugins.
$ wp core download Downloading WordPress 4.8 Md5 hash verified:
c5366d0521831dd029dfc38e56a5 Success: WordPress downloaded.
$ wp core install Success: WordPress installed successfully.
$ wp plugin update Updating to version 4.9 Downloading update...
Unpacking the update... Success: WordPress updated successfully.
Use Cases
Example Use Cases • Plugin/Theme Development • Local Development Environments
• Client Site Maintenance • WordPress as a Service
Plugin/Theme Development • Scaffold new plugins • Run PHPUnit tests
Local Development Environments • Download/Install/Update WordPress • Auto install plugins/themes
• Search/Replace database values (site migration) • Launch PHP’s built-in web server $ wp serve –-host=wordpress.dev ~/code/wordpress now available at wordpress.dev:80
Client Site Maintenance • Remotely Update WordPress (SSH) • Check
for plugin updates • Restore down sites (white-screen of death) $ wp plugin deactivate <plugin name> --skip-plugins Success: Plugin <plugin name> deactivated.
WordPress as a Service • Check for updates • Create
user accounts • Create new installs $ wp site create --slug=example Success: Site 3 created. wordpress.dev/example
Extending WP-CLI
$ wp ninja-forms list-forms public function list_forms( $args, $assoc_args )
{ foreach( Ninja_Forms()->forms() as $form ){ WP_CLI::line( ‘#’ . $form[‘title’] ); } }
Outside of WordPress
Laravel $ artisan # Generate a new controller. $ artisan
make:controller PostController # Re-run database migration with seed data. $ artisan migrate:refresh --seeds
Drupal $ drush # Run pending updates on staging site.
$ drush @staging updatedb # Synchronize staging files to production. $ drush rsync @staging @ list