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
560
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
18
Getting Good With WordPress Playground
ajitbohra
0
69
Embracing WordPress Packages
ajitbohra
0
22
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
260
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
46
Gutenberg For Bloggers & Developer
ajitbohra
0
36
Finding A Right Home For WordPress
ajitbohra
1
560
Tools Of Trade For WordPress Developer
ajitbohra
0
430
Making Money With WordPress
ajitbohra
0
560
Other Decks in Technology
See All in Technology
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
210
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
180
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
300
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
330
TypeScript、上達の瞬間
sadnessojisan
47
14k
Application Development WG Intro at AppDeveloperCon
salaboy
0
200
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
350
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
180
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
230
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Practical Orchestrator
shlominoach
186
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
A designer walks into a library…
pauljervisheath
204
24k
Bash Introduction
62gerente
608
210k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Six Lessons from altMBA
skipperchong
27
3.5k
Building an army of robots
kneath
302
43k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
380
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.