Post on 27-Aug-2014
description
transcript
./WP-CLIhttp://wp-cli.org
CLI? What is it anyways?
Command Line Interface
So, WP-CLI is,
● A way to interact with WordPress using command line.
● Alternatively, a set of command line tools, to interact with WordPress
Requirements
● *nix environment (Linux, Mac OSX, BSD)● Windows user? Use Cygwin● PHP 5.3.2+ (with php cli)● WordPress 3.4+
Installation#download from server
>curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
#make executable
>chmod +x wp-cli.phar
#move inside search path, now has alias “wp”
>sudo mv wp-cli.phar /usr/local/bin/wp
Access it from command line
wp --info
PHP binary: /usr/bin/php5PHP version: 5.5.3-1ubuntu2.6php.ini used: /etc/php5/cli/php.iniWP-CLI root dir: phar://wp-cli.pharWP-CLI global config:WP-CLI project config:WP-CLI version: 0.15.1
Good news! If you get something like this :
So, What can it do for me?
● Almost anything● Sorry, It can't make you coffee ( - ryanduff)
What's the point then?
The main point is:
New Installation
wp core download
it just downloads WordPress.
For installation, read the documentation
Documentation at
http://wp-cli.org/commands/
Search and replace
wp search-replace "WordPress" "Awesome WordPress" wp_posts
Export and import
#export
wp export --dir=backup
#import
wp import backup/hello.wordpress.2014-07-17.0.xml --authors=create
Installing and activating plugins
wp plugin install wp-user-frontend --activate
Other thing with plugins
● Listing● Searching● Deleting● Activate/Deactivate/Toggle
● update
Themes
● Yes!
And some other features
● User management● Comments● Media● Options● …......
Multi Site?
Yes.
Extending?
Yeah sure!
https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook
Questions?
A bit about myself
Anam Ahmedhttp://anam.co
fb.me/theanam
@mranam