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
Manage WordPress Easily With WP-CLI
Search
Ajit Bohra
November 05, 2017
Technology
0
580
Manage WordPress Easily With WP-CLI
Workshop at WordCamp Nashik 2017, Ajit Bohra, Hardeep Asrani & Gagan Deep Singh
Ajit Bohra
November 05, 2017
Tweet
Share
More Decks by Ajit Bohra
See All by Ajit Bohra
Laravel x WordPress
ajitbohra
0
33
Getting Good With WordPress Playground
ajitbohra
0
94
Embracing WordPress Packages
ajitbohra
0
63
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
300
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
66
Gutenberg For Bloggers & Developer
ajitbohra
0
43
Finding A Right Home For WordPress
ajitbohra
1
580
Tools Of Trade For WordPress Developer
ajitbohra
0
450
Making Money With WordPress
ajitbohra
0
610
Other Decks in Technology
See All in Technology
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
150
OpenShiftでllm-dを動かそう!
jpishikawa
0
100
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
AI駆動PjMの理想像 と現在地 -実践例を添えて-
masahiro_okamura
1
110
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
190
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
430
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
Red Hat OpenStack Services on OpenShift
tamemiya
0
100
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
640
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Into the Great Unknown - MozCon
thekraken
40
2.3k
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Curious Case for Waylosing
cassininazir
0
230
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
76
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
The Limits of Empathy - UXLibs8
cassininazir
1
210
Transcript
Manage WordPress Easily with WP-CLI Ajit Bohra, Hardeep Asrani &
Gagan Deep Singh
How many of you are Command Line users?
How many of you are using WP-CLI?
What is WP-CLI?
Why not WP-CLI?
Which one was easier?
Expectations & Takeaways
Let’s get started!
Install WP-CLI # Install WP-CLI $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar #
Make the file executable $ chmod +x wp-cli.phar # Move it to somewhere in your PATH $ sudo mv wp-cli.phar /usr/local/bin/wp # Test WP-CLI. $ wp —info Source: wp-cli.org
Command Structure $ wp plugin install wordpress-seo - -activate command
subcommand parameter flag
Useful Commands
Plugin Commands: Install & Activate $ wp plugin install bbpress
- -activate
Plugin Commands: Deactivate $ wp plugin deactivate bbpress
Plugin Commands: Delete $ wp plugin delete bbpress
Theme Commands: Install & Activate $ wp theme install make
- -activate
Theme Commands: Deactivate $ wp theme deactivate make
Theme Commands: Delete $ wp theme delete make
Manage Users: List Users $ wp user list
Manage Users: Create User $ wp user create harry
[email protected]
- -role=author
Manage Users: Change Password $ wp user create bob
[email protected]
--role=author
Manage Users: Delete User $ wp user delete 10
Manage Media: Upload Media $ wp media import https://example.com/image.png
Manage Media: Regenerate Media $ wp media regenerate - -yes
Manage Posts: Create Posts $ wp post create --post_type=page --post_title='A
sample post'
Manage Posts: Edit Posts $ wp post edit 123
Manage Posts: Generate Posts $ wp post generate --count=10 --post_type=page
--post_date=1999-01-04
Export/Import Posts: Generate Posts $ wp export
Export/Import Posts: Generate Posts $ wp import example.wordpress.2016-06-21.xml --authors=create
Search/Replace $ wp search-replace ‘http://old-site.com' ‘http://new-site.com'
Now it’s your time.
Resources http://wp-cli.org/ https://developer.wordpress.org/cli/commands/ https://local.getflywheel.com/ https://commandlinepoweruser.com/ https://serversforhackers.com/ https://mediatemple.net/community/products/dv/204403684/ connecting-via-ssh-to-your-server
Thank you.