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
32
Getting Good With WordPress Playground
ajitbohra
0
94
Embracing WordPress Packages
ajitbohra
0
62
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
300
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
62
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
AI Agent Standards and Protocols: a Walkthrough of MCP, A2A, and more...
glaforge
1
460
人はいかにして 確率的な挙動を 受け入れていくのか
vaaaaanquish
3
1.3k
持続可能な開発のためのミニマリズム
sansantech
PRO
3
470
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kentarofujii
0
240
The Engineer with a Three-Year Cycle - 2
e99h2121
0
160
【northernforce#54】SalesforceにおけるAgentforceの位置づけ・事例紹介
yutosatou_kit
0
110
漸進的過負荷の原則
sansantech
PRO
2
230
Data Hubグループ 紹介資料
sansan33
PRO
0
2.6k
AWS Amplify Conference 2026 - 仕様からリリースまで一気通貫生成 AI 時代のフルスタック開発
inariku
3
330
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
300
書籍執筆での生成AIの活用
sat
PRO
0
130
スクラムを一度諦めたチームにアジャイルコーチが入ってどう変化したか / A Team's Second Try at Scrum with an Agile Coach
kaonavi
0
280
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Side Projects
sachag
455
43k
Rails Girls Zürich Keynote
gr2m
96
14k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
120
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
290
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Accessibility Awareness
sabderemane
0
38
BBQ
matthewcrist
89
10k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
890
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
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.