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
楽々!楽しい?WP-CLI入門記
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takeshi Igarashi
December 17, 2017
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
楽々!楽しい?WP-CLI入門記
このスライドは、2017年12月17日に開催された「WordBench東京 12月勉強会 年末LT忘年会」3本目にイガラシが発表したものです。読みやすくなるよう若干加筆修正を行いました。
Takeshi Igarashi
December 17, 2017
More Decks by Takeshi Igarashi
See All by Takeshi Igarashi
ご当地わぷーのつくりかた(静岡編)
takeshi81
0
83
WordPressローカル環境のすゝめ 〜サーバに上げる、その前に〜
takeshi81
0
310
速い!CSS
takeshi81
0
100
Other Decks in Programming
See All in Programming
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
230
ActionController meets Protocol Buffers
sorah
1
780
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
SODA - FACT BOOK(EN)
sodainc
1
210
Crash Auto Pipelines
veronikapj
1
380
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
290
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
300
はじめてのPLATEAU
nokonoko1203
1
570
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
Seven New Principles of Software Engineering
yegor256
0
460
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.3k
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
2
4.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
120k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
520
Into the Great Unknown - MozCon
thekraken
41
2.8k
Done Done
chrislema
187
17k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Amusing Abliteration
ianozsvald
1
380
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
Transcript
楽々!楽しい? WP-CLI ⼊⾨記 五⼗嵐 武志 2017/12/17 WordBench Tokyo
ご案内 このスライドは、2017年12⽉17⽇に開催された 「WordBench東京 12⽉勉強会 年末LT忘年会」 3本⽬にイガラシが発表したものです。 読みやすくなるよう若⼲加筆修正を⾏いました。
whoami 五⼗嵐 武志 Web開発者 ★ HTML5/CSS3 ★ WordPress ★ Cloud
Computing(AWS他) デザイナー ★ UX/ユーザー中⼼設計(UCD) takeshi81
whoami 五⼗嵐 武志 コミュニティ ★ DIST http://dist.tokyo ★ WordPressとおやつの会 2010-2013
★ F-site http://f-site.org 2002-2016 takeshi81
WP-CLIで出来ること
WP-CLIで出来ること • WordPressの管理画⾯で出来ることは、ほ とんどコマンドライン(CLI)から実⾏でき ます • コアファイルのダウンロード、wp- config.phpの作成、インストールもコマン ドで実⾏できます
WP-CLIで出来ること • 開発のための便利なツールも使えます ✦ 例えば、WordPressのデータベースの検 索置換をスマートに実⾏できます (Search Replace DB。直にSQLで検索置換すると中⾝が壊れますよ)
Graphical User Interface (GUI) vs Command Line Interface (CLI) •
⼈間にとって親切、簡単、安⼼設計のGUI
Graphical User Interface (GUI) vs Command Line Interface (CLI) •
CLIのよさ:
Graphical User Interface (GUI) vs Command Line Interface (CLI) •
CLIのよさ: かっこいい
Graphical User Interface (GUI) vs Command Line Interface (CLI) •
⼈間にとって親切、簡単、安⼼設計のGUI • CLIのよさ: ✗ かっこいい ✔ ⼿順を記録できる = 作業を⾃動化できる
Graphical User Interface (GUI) vs Command Line Interface (CLI) •
⼈間にとって親切、簡単、安⼼設計のGUI • CLIのよさ: ✗ かっこいい ✔ ⼿順を記録できる = 作業を⾃動化できる • 同じような仕事は(シェルスクリプトでも書いて)機械に やってもらいましょう
例えば、インストール
例えば、インストール $ wp core download --locale=ja $ wp config create
--dbname=demo_dev \ --dbuser=demo_dev \ --dbpass=useSECUREpassw0rd! --locale=ja $ wp core install --url=demo.dev.test \ --title=WordPressExample \ --admin_user=myblogadmin \
[email protected]
None
URLの変更(サーバー移転、SSL対応 など) $ wp search-replace 'http://indigo-design.org' \ 'https://indigo-design.org' --skip-columns=guid
+-------------+-----------------------+--------------+------+ | Table | Column | Replacements | Type | +-------------+-----------------------+--------------+------+ | wp_comments | comment_author_url | 2 | SQL | | wp_comments | comment_content | 1 | SQL | | wp_options | option_value | 32 | PHP | | wp_postmeta | meta_value | 205 | PHP | | wp_posts | post_content | 47 | SQL | | wp_posts | post_content_filtered | 22 | SQL | +-------------+-----------------------+--------------+------+ Success: 309 replacements to be made.
プラグイン・テーマの管理 プラグインのインストール $ wp plugin install hello --activate プラグインのアンインストール $
wp plugin uninstall hello --deactivate テーマのインストール $ wp theme install twentysixteen --activate テーマの削除 $ wp theme delete twentysixteen
まだまだ紹介していない 機能がたくさん
たまにドキュメント読む と、時々機能が増えてます
さあ、はじめよう
お役⽴ちリンク集 • WP-CLI 公式サイト http://wp-cli.org/ • WP-CLI コマンド⼀覧 https://developer.wordpress.org/cli/commands/ •
WP-CLI 完全ガイド by 宮内さん @miya0001 https://capitalp.jp/2017/02/03/guide-of-the-wp- cli/