I need to upgrade my Drupal install from 6.12 to 6.13. I know that Drush doesn't upgrade the base Drupal system, just the modules, but I think Drush could really help with some of the tedious steps.
One of the parts I hate most is disabling all contributed modules and then later re-enabling them.
I know drush statusmodules will give me a list of all modules, and whether they're enabled or disabled.
Is there any way to to use Drush so that I can disable all currently-enabled modules, and then a few minutes later, when I'm done putting in the new Drupal code, re-enable all of those same modules at one go?
Thanks!
Comments
Comment #1
moshe weitzman commenteddrush statusmodules --pipe gives you all enabled. could be improved to give you all enabled that are non core (there is an issue open for that). you can pipe this list into `drush disable`.
Comment #2
steve02476 commentedBefore I even saw your answer, I experimented with
drush statusmodules --pipe. I thought I'd be clever and copy and paste the output to the end of adrush disablecommand. If I hadn't been so stupid, I could have predicted the result - all modules, including the core modules, got disabled, with the result that Drupal and consequently drush was dead. (I had thought I could just re-execute the command but withdrush enableto undo it all - but I guess if Drupal is hosed then drush is not able to do stuff.) Fortunately, I did this with a test site, not my live site, and I was pretty much able to get it alive again by manually setting the status of the modules in the system table.But I think for the future, I'll just explicitly disable and enable modules, one at a time - seems safer!
Is there an idiot's guide available for making a "script" for drush to run? Can I just make a text file that looks like this:
and then run
drush <mydrushscript?Thanks for everything.
Comment #3
dawehnerHave a look at example.drush.inc in the drush directory.
Comment #5
PGNetDev commented> (there is an issue open for that)
can you please 'point' to that issue? would be a nice-to-have ...
thanks!