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
Getting Good With WordPress Playground
ajitbohra
0
52
Embracing WordPress Packages
ajitbohra
0
10
Laravel: Launcher For Your Next Big Idea
ajitbohra
1
240
LaravelLiveIn Mumbai Meetup December 2018
ajitbohra
0
39
Gutenberg For Bloggers & Developer
ajitbohra
0
26
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
Diet & LifeStyle For WordPress
ajitbohra
0
450
Other Decks in Technology
See All in Technology
AIQ株式会社 エンジニア向け会社紹介資料
aiqlab
0
370
Databricksを活用してDELISH KITCHENのレシピレコメンドを開発した話
furu8
0
250
疲弊しない!AWSセキュリティ統制の考え方 #devio_osakaday1
masahirokawahara
6
5.9k
0→1開発における技術選定において一番大切なこと
bicstone
1
320
Four keys改善の取り組み事例紹介
sansantech
PRO
3
230
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
630
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
160
シン・Kafka / shin-kafka
oracle4engineer
PRO
7
2.7k
エンタープライズ環境下での Active Directory の運用 TIPS
tamaiyutaro
1
1.5k
キャラクター制御のためのプロンプト術 for LINE Bot
uezo
0
520
Discord とビルダー&チャットボットの使い方 / How to use Discord and Builder & Chatbots
ks91
PRO
0
130
普段有償でサポート業務をしているCSAが技術知見を無料で公開する理由
07jp27
1
630
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
220
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
11
4.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
Building Effective Engineering Teams - LeadDev
addyosmani
27
1.8k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Debugging Ruby Performance
tmm1
70
11k
Become a Pro
speakerdeck
PRO
10
4.5k
Docker and Python
trallard
33
2.7k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
115
18k
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.