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
500
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
11
Getting Good With WordPress Playground
ajitbohra
0
53
Embracing WordPress Packages
ajitbohra
0
11
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
240
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
39
Gutenberg For Bloggers & Developer
ajitbohra
0
27
Finding A Right Home For WordPress
ajitbohra
1
530
Tools Of Trade For WordPress Developer
ajitbohra
0
420
Making Money With WordPress
ajitbohra
0
530
Other Decks in Technology
See All in Technology
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
2
600
Gemini, Google's Large Language Model
glaforge
0
110
MixIT 2024 - Pulumi : Gérer son infra avec son langage de programmation préféré
ju_hnny5
1
120
IaCからAWSに入門した初心者が CloudFormationを通して考えた「AWS操作」の使い分け
maimyyym
2
530
Max out Local LLM in Challenging Environments
sashimimochi
2
180
令和最新版 Ruby プロファイラ "Pf2" のご紹介
osyoyu
0
140
生産性向上チームの紹介
cybozuinsideout
PRO
1
950
コードファーストの考え方。 Amplify Gen2から学ぶAWS次世代のWeb開発体験
yoshiitaka
2
470
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
2
410
Microsoft for Startups Founders Hub_20240429 update
daikikanemitsu
1
2.4k
M5と自作基板をくっつけてみた〜M5 Japan Tour 2024 Spring 福冈 (Fukuoka|福岡)〜
keropiyo
0
190
今日からできる!簡単 .NET 高速化 Tips -2024 edition-
xin9le
7
4.4k
Featured
See All Featured
Debugging Ruby Performance
tmm1
70
11k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
The Pragmatic Product Professional
lauravandoore
26
5.8k
Navigating Team Friction
lara
179
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
GitHub's CSS Performance
jonrohan
1025
450k
How to train your dragon (web standard)
notwaldorf
75
5.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
The Art of Programming - Codeland 2020
erikaheidi
43
12k
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.