Administer WordPress with WP-CLI

download Administer WordPress with WP-CLI

If you can't read please download the document

Transcript of Administer WordPress with WP-CLI

PowerPoint Presentation

Administer WordPress with WP-CLI

No Browser only Command Line

SUWASH KUNWAR

http://wensolutions.comhttp:suwash.com.np

Installing a Child Theme

6 StepsSearch

Download

Extract

Copy

Paste

Activate

Time : couple of minutes

Using command line ..

Just 1 Commandwp theme install buntu --activate

Time : within some secs

WPCLI ?Tool to manage WordPress from the command line

Super easy commands

Work super fast

Dont touch browser

Installing WPCLI Download

curl -o https://raw.githubusercontent.com/ wp-cli/builds/gh-pages/phar/wp-cli.phar

Set permission

chmod +x wp-cli.phar

Move file to safe location

sudo mv wp-cli.phar /usr/local/bin/wp

Now work with alias wp

Lets check whether its working or not.

Understand commandwp user list --role=editor

[package] [command] [sub-command] [optional parameters]

Lists all the users whose role is editor.

Lets try it ...

Installing WordPressCreate database

WP core download

Generate WP config

WP install

Managing ThemesManaging themes is quite easier from command line.

Install

Delete

Activate

Update

Search

.. much more

Commandwp theme

Lets try some commands...

Command: wp theme search

Commands - wp theme install [theme-slug] - wp theme activate [theme-slug]- wp theme install [theme-slug] --activate

Command: wp theme list

Managing Pluginsmanaging themes is quite easier from command line

Install

Delete

Activate

Update

Search

.. much more

Command : wp plugin search

Install and activate plugin

Command : wp plugin install [plugin-slug] --activate

Check plugin for update

Command : wp plugin list --update=available

Command: wp plugin update

Manage Database

export

import

reset

drop

query

search/replace

...etc.

Lets export & import the database..

Commands:

- wp db export- wp db import- wp db reset

Query database ...

Command : wp db query

Query tables

Search and Replace

Command

wp search replace

Managing Media

Import Media

Command:

wp media import ~/Pictures/**\/*.jpg

Example:

wp media import ~/Pictures/**\/*.jpg

Command: wp media import

Command : wp media regenerate

Lets go little advance !!

Do you always write code yourself for post types, taxonomy ?

Scaffold

Command: wp scaffold

Scaffold for parent theme and child theme...

Multisite

Multisite : commands

wp core multisite-install

wp core multisite-convert

community-maintained commands

http://wp-cli.org/package-index/

Command: wp package install

WP-CLI package

WP CLI integrations

COMMAND WORDPRESS PLUGIN

acfAdvance Custom Fields

backupBackupBuddy

wcWooCommerce

eddEasy Digital Downloads

total-cacheW3 Total Cache

jetpackJetpack by WordPress.com

unsplashImport image from Unsplash

Am gonna use it .

www.wp-cli.org

UNIX-like environment

PHP 5.3.29 or later

WordPress 3.7 or later

Requirements ?

Supporting Hosts

Any Questions ?

@suascathttp://suwash.com.np