Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Adv WP CLI

Tom J Nowell
September 23, 2014

Adv WP CLI

Advanced WP CLI talk for WP Leeds dev night

Tom J Nowell

September 23, 2014
Tweet

More Decks by Tom J Nowell

Other Decks in Technology

Transcript

  1. I’ll Cover • What is WP CLI • Some WP

    CLI Commands & Usage • Demo
  2. Some of the Things WP CLI Can Do • Create

    Posts • Create Users • Download plugins and themes • Database Queries • Installing WordPress
  3. List blogs, and their URLs in a multisite ❯ blogs=$(wp

    site list --fields="site_id, blog_id,url" --format="csv") for entry in $blogs do site_id=$(echo $entry |cut -d ',' -f1 ) blog_id=$(echo $entry |cut -d ',' -f2 ) blog_url=$(echo $entry |cut -d ',' -f3 ) echo "$blog_id: $blog_url in $site_id" done