9

I'm working with Drupal on a project right now, and for all it's faults, having a commandline interface like drush to the Drupal framework is a godsend.

Is there an equivalent for using Wordpress to let you control which plugins a site is deployed with, or what ddefault settings should be?

Or is the current best approach just to drop this stuff into wp-config or somewhere similar?

6

I have been working on a simple and pluggable command line interface. The basic work is done but we now need to start writing more commands (and implement it in plugins). Please feel free to fork and contribute!

You can find the code on Github.

  • That does indeed look nice. Fork fork fork… :) – Chris Adams Nov 30 '11 at 17:09
3

Hi @Chris Adams:

I just ran across these WordPress Mass Management Tools which are not the same as drush but are the closest thing I seen thus far.

3

The WP-CLI http://wp-cli.org initiated by andreascreten and now maintained by scribu is the closest thing. It's core functions are limited, but it's easily extended with custom commands.

The core functions should cover needs you describe, controlling plugins and settings.

As a side note: I recently used wp-cli to set up 2.000 product attributes with associated images for WooCommerce. It took an hour to install wp-cli and write a WordPress plugin to extended WP-CLI with my custom command.

After that I could run the command against the path to my image files like this

wp woocom_imgattr_create path/to/img/*.png --attr=color

That just saved me 17 hours of clicking-dragging-swiping-typing

2

Daniel Bachhuber gave a presentation at WordCamp Seattle 2012 called WordPress at the Command Line – An Introduction to wpshell and wp-cli. The presentation notes are available on his website, and the video should be on WordPress.tv soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.