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
49
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
79
WordPressローカル環境のすゝめ 〜サーバに上げる、その前に〜
takeshi81
0
310
速い!CSS
takeshi81
0
97
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
940
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
110
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
150
Security issues being discussed on Web Platforms
petamoriken
0
780
スマート反転とウェブアクセシビリティ
camiha
0
200
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
150
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
ALB ログから Trace を気合で繋げる技術
fohte
7
880
Webの地図
yosuke_furukawa
PRO
6
4.2k
業務時間外もAIに働いてもらう話
colorful12
3
10k
信頼性の目標を誰も求めてない
shubox
0
500
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
The SEO Collaboration Effect
kristinabergwall1
1
550
Test your architecture with Archunit
thirion
2
2.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
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/