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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ajit Bohra
November 05, 2017
Technology
590
0
Share
Manage WordPress Easily With WP-CLI
Workshop at WordCamp Nashik 2017, Ajit Bohra, Hardeep Asrani & Gagan Deep Singh
Ajit Bohra
November 05, 2017
More Decks by Ajit Bohra
See All by Ajit Bohra
Laravel x WordPress
ajitbohra
0
37
Getting Good With WordPress Playground
ajitbohra
0
98
Embracing WordPress Packages
ajitbohra
0
74
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
300
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
69
Gutenberg For Bloggers & Developer
ajitbohra
0
50
Finding A Right Home For WordPress
ajitbohra
1
590
Tools Of Trade For WordPress Developer
ajitbohra
0
460
Making Money With WordPress
ajitbohra
0
630
Other Decks in Technology
See All in Technology
AI Adaptable なテストを整える工夫 / Ways to Make Your Tests AI-Adaptable
bitkey
PRO
2
210
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
2
2.1k
Diagnosing performance problems without the guesswork
elenatanasoiu
0
150
OpenID Connectによるサービス間連携
takesection
0
150
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
710
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
140
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
250
MIERUNE JCT 発表資料「宇宙から伊能忠敬ごっこ」
syuchimu
0
110
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
6
720
サイバーセキュリティ概論 / Introduction to Cybersecurity
ks91
PRO
0
130
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
180
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
170
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How to make the Groovebox
asonas
2
2.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
First, design no harm
axbom
PRO
2
1.2k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Why Our Code Smells
bkeepers
PRO
340
58k
Site-Speed That Sticks
csswizardry
13
1.2k
Into the Great Unknown - MozCon
thekraken
41
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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.