Skip to main content
Guaka!
from free software to free life
  • Home
  • Guaka
  • Projects

WordPress command line interface

  1. Home

tag:

  • cli
  • wordpress
  • drupal

Drush is an amazing tool to manage Drupal installation from the command line. The other day I was once more annoyed at the lack of such tool for dealing with WordPress, more specifically keeping a WordPress site up-to-date. I started coding and quickly I had a couple of useful commands. But then I stumbled upon WP-CLI

"a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser."

Check the installation instructions at wp-cli.org. After that you can download wordpress like this:

wp core download

This will not yet set up the site. For that you can use

wp core config --dbname=your_db_name --dbuser=your_db_user --dbpass=your_db_pass

And possibly add e.g. --locale=nl_NL if you want a WordPress site in Dutch.

This is already quite nice but it gets much better when using wp-cli to write scripts for automation.
Here are some scripts to facilitate setting up new WordPress sites and to configure new and existing sites:

Recent stories

WordPress command line interface
Upgraded guaka.org to Drupal 7, moneyless
meteor-phonegap and Radio Meteor
Rest in peace, Taylor
Wikitravel was freed and everyone moved on to Wikivoyage
Some linguistic origins of hospitality
It's just a game?
Javascript everwhere: PhoneGap and Node.js (and no Eclipse)
Back to blog: more posts coming up
Watch out for Autoblogging!
Slicehost DNS API Python code
Remove all blocks from a Drupal theme