I'm working with Drupal on a project right now, and for all its faults, having a command line 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 default settings should be?
Or is the current best approach just to drop this stuff into wp-config or somewhere similar?
I'm working with Drupal on a project right now, and for all its faults, having a command line 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 default settings should be?
Or is the current best approach just to drop this stuff into wp-config or somewhere similar?
Share Improve this question edited Dec 17, 2019 at 16:47 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Sep 29, 2010 at 8:34 Chris AdamsChris Adams 2312 silver badges4 bronze badges 2- 1 I am not sure about specifics of what drush does. For setting up new WP installs by code see this question Initialization Script for “Standard” Aspects of a WordPress Website? (work in progress). – Rarst Commented Sep 29, 2010 at 8:59
- Hi @Chris Adams - AFAIK there isn't one yet, but if you want to work on such a project I'm sure that many of would be happy to see it! :) – MikeSchinkel Commented Sep 29, 2010 at 9:14
4 Answers
Reset to default 6I 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.
The WP-CLI http://wp-cli initiated by andreascreten and now maintained by scribu is the closest thing. Its 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
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.
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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744895560a4599673.html
评论列表(0条)