Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to WP-CLI
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kyle B. Johnson
November 02, 2017
Programming
340
0
Share
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
140
Building Pages in WordPress
kjohnson
0
180
Gutenberg
kjohnson
0
380
Separate your time from your income
kjohnson
0
490
iThemes Exchange
kjohnson
0
130
Easy Digital Downloads
kjohnson
0
84
PHP Templating
kjohnson
0
130
WordPress Taxonomies
kjohnson
0
88
objects-a-short-intro.pdf
kjohnson
0
200
Other Decks in Programming
See All in Programming
iOS26時代の新規アプリ開発
yuukiw00w
0
220
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
310
AIエージェントの隔離技術の徹底比較
kawayu
0
450
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
180
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3k
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
220
Oxcを導入して開発体験が向上した話
yug1224
4
260
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
300
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
210
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
230
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Documentation Writing (for coders)
carmenintech
77
5.4k
Tell your own story through comics
letsgokoyo
1
940
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
AI: The stuff that nobody shows you
jnunemaker
PRO
7
670
Making Projects Easy
brettharned
120
6.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Between Models and Reality
mayunak
4
320
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Into the Great Unknown - MozCon
thekraken
41
2.5k
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