Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands for interacting with code like modules, themes or profiles.

learn more… | top users | synonyms

0
votes
1answer
11 views

How can I download code from Github?

I'm still running some Drupal 6 sites (because I'm waiting for the Migrate module to work properly in Drupal 8), and I notice that there are some modules in rupal D6 (like Views) which are still ...
0
votes
2answers
20 views

Drush cr command error's [duplicate]

I am using drush for drupal caches clear, module enable/disable and so more commands. My drush version is 5.4, it working fine for drupal 7 but now i creating new product in drupal 8. I am using same ...
0
votes
0answers
10 views

Why do I get “not a valid stream resource”?

I've got a Drush shell script in which I'm writing a CSV file, using the following code. $fp = fopen('table_tag_audit.csv', 'w+'); foreach ($csv as $l) { fputcsv($fp, $l); } fclose($fp); ...
5
votes
2answers
62 views

How to delete a node or a list of nodes with Drush?

I discovered the Delete all module which gives you the ability to delete all the nodes of a given content type. However, with this module you can't delete a single node or a list of nodes. In the ...
0
votes
1answer
41 views

Installing Drush on WSL

How do you install Drush on WSL (Windows Subsystem for Linux) when the following command from Drush docs, doesn't work? php -r "readfile('http://files.drush.org/drush.phar');" > drush
-1
votes
2answers
36 views

How to setup drush in ubuntu? [closed]

I am using ubuntu operating system.And I am unable to setup drush for drupal 7. I need to use any command for this or need to use drush module?
0
votes
0answers
16 views

drush 8.1.2 not working with drupal 7 with windows

I have installed drush 8.1.2 on windows 7 but it not worked for drupal 7 project. Few command are working but few are not working. drush uli 1 [Working] drush dl <project name> [Working] drush ...
0
votes
1answer
25 views

Drush 8.1 Drupal 8 throws PDOException: SQLSTATE[HY000] [2002] on MAMP [duplicate]

After installing Drupal 8 (via installation wizard), trying to run any drush command, getting below error: drush en views_ui PDOException: SQLSTATE[HY000] [2002] No such file or directory in core/lib/...
0
votes
1answer
13 views

How to install a local module file with drush?

I have a local environment I am working on and I want to use drush to install a local file/module I have that was created by a exported feature. The reason I am not doing it with update manager is ...
1
vote
2answers
26 views

Drush Update Command Won't Work for Multisites

I have a Drupal 7 site with a half-dozen multisites/subsites and I am trying to setup Drush so that I can run my modules updates from the command line for the subsites. Running Drush for the main site ...
0
votes
1answer
21 views

How do I link drush to my drupal site thats hosted via localhost?

I have installed drush via terminal, but how do I link it to my 2 local drupal sites? When I do drush status I get this: PHP configuration : /etc/php/7.0/cli/php.ini PHP OS : ...
4
votes
1answer
65 views

What module name do I use for drush dl?

I'm trying to install the Delete All module on Drupal 7 via Drush, but whenever I type drush dl delete-all I get the following error: No release history was found for the requested project (delete-...
1
vote
2answers
20 views

Cannot redeclare class Drush error

When I go to my site on command line and run a drush command I get the following error: PHP Fatal error: Cannot redeclare class Drush in /var/www/xmd8/www/vendor/drush/drush/lib/Drush.php on line 36 ...
2
votes
1answer
25 views

How do you use Drush to import a bunch of users via a csv file from the command line terminal?

I have a csv file of users and I would like to use the "drush user-create" command to create an account with these users and have them blocked by default with no password. I noticed that there is a -...
1
vote
1answer
83 views

Linux Drush install error: Undefined class constant 'MYSQL_ATTR_SSL_CA' in phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php, line 56

I tried installing Drush with both methods listed in the drush.org documentation. I think they might be conflicting with each other if that's possible. When I run composer global require drush/drush ...
1
vote
0answers
21 views

Commands don't work anymore on a site running on a virtual machine

To explain in specifics, when I run any drush command like drush en, drush fl or drush fra or any similar site specific commands, they don't get executed and I get the following output: The drush ...
0
votes
1answer
10 views

drush features-list-packages in drupal 8 doesn't include prefix

I've just started using Drush and Features with Drupal 8. I'm running into a point of confusion, and I can't figure out if it's a feature or a bug. In the past our team prefixed all the site-specific ...
1
vote
2answers
23 views

run a drush command with another user

I am using drupalvm to manage my vagrant machines and I want to be able to be able to log into the vagrant machine and run drush to sync with the dev/stage/prod environments. I cannot do this without ...
3
votes
1answer
29 views

How do I ignore a module .git directory?

I've got a Drupal 8 installation that I manage with Drush 8.1.2, with nothing in that installation in Git except a custom module I am writing (module directory = location of .git directory = /sites/...
1
vote
3answers
84 views

set default timezone, date first day and date format medium via drush

Is there is away to set : default timezone date first day date format medium via drush instead of doing it via drupal web interface ?
0
votes
0answers
38 views

problem in Install Drush in Mac [duplicate]

I install Acquia Dev Desktop on my Mac, I setup my site with it ,my site directory path is ~/zhilevan/Sites/devdesktop/mysite , when I try type Drush in anywhere out of ~ drush work correctly but ...
0
votes
0answers
12 views

Update Windows Drush Past 7.0.0

I have drupal and drush running on windows currently. I am using drupal 7 so I am also using drush 7 because the install is much simpler than 8. Drush 7 has a specific windows version (windrush ...
1
vote
1answer
29 views

Why are `drush pm-list` & `drush pm-updatestatus` disabling the default theme?

I have a Drupal 7 site with 3 themes enabled: Foo Adminimal Shiny Foo is a custom theme for the front-end, located in /sites/foo/themes/ and set as the default. Adminimal and Shiny are both ...
0
votes
1answer
13 views

Drush and web front end reporting strange updates?

Is anybody else seeing this: root@dev:/etc/apache2/htdocs/drupal-7/sites/tpppdonate.org.uk# drush pm-update --pipe imagecache_token 7.x-1.0-rc2 7.x-1.x-dev Update-available uuid 7.x-1.0-beta1 7.x-1.x-...
3
votes
1answer
34 views

What is the “D8” way of using Drush QuickDrupal (qd)?

In D7 development I would use drush qd -y and php -S localhost:8000 almost weekly to get a fresh development copy of D7 to build modules or test modules before I put them into our actual dev boxes. ...
0
votes
1answer
65 views

“Error: Undefined class constant 'Symfony\Component\DependencyInjection\ContainerInterface::SCOPE_CONTAINER'”

I am using drush 8.1.2 and drupal 8.1. I ran composer update in /core as well as in the project root. From what I can see it updates /core/vendor as well as /vendor (in project root). Obviously ...
4
votes
2answers
155 views

Is it possible to run drush 8 smoothly on Win10 WSL (Windows Subystem for Linux)?

As most here know, Microsoft and Canonical worked together to develop a Windows-included Linux-based, Ubuntu-oriented compatibility layer (WSL) and already gives the option to install it for all ...
1
vote
0answers
28 views

Composer does not update drush [duplicate]

composer global update Changed current directory to /home/ckosloff/.composer Loading composer repositories with package information Updating dependencies (including require-dev) Your ...
1
vote
1answer
41 views

Bootstrap level error [duplicate]

When I attempt to use Drush 8.0.3 on a clean Drupal 8.1.1 install, I receive the following error: Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more ...
1
vote
1answer
48 views

How to drush enable a module only if is not installed

I would like to drush enable a bunch of modules in a certain environment via a shell script that runs EVERY TIME the environment rebuilds when new code is committed. (This saves me from having to have ...
0
votes
0answers
80 views

Unable to upgrade from Drush 5.10.0 to Drush 8

I try to upgrade from drush 5.10.0 to 8 by using the following command: sudo composer global require drush/drush:~8 And it returns: Changed current directory to /home/lupiyardo/.composer Running ...
1
vote
1answer
16 views

Freshly installed Drush is unresponsive

I'm on an Amazon Linux machine. I ran: $ composer global require drush/drush Changed current directory to /home/ec2-user/.composer Using version ^8.1 for drush/drush ./composer.json has been updated ...
0
votes
1answer
65 views

How do I change the default theme with Drush-master

I've installed a premium theme in a Drupal 8.1.0, and now each time I log into the site It crashes with the error "An unknown error has occurred" (even though the site itself works fine). I thus try ...
2
votes
0answers
27 views

Problems upgrading drush from 5.10.0 to drush 7 on Ubuntu [duplicate]

I'm trying to upgrade my drush install on my local ubuntu machine but when I type in 'composer global require drush/drush:dev-master' I get the following error: Changed current directory to /home/...
2
votes
2answers
86 views

Why doesn't drush respond to commands after install

Setup I just followed the directions on the drush website for installing drush. I performed the command php -r "readfile('http://files.drush.org/drush.phar');" > drush Then attempted the next ...
0
votes
0answers
21 views

How to set backup directory in a drush 8.x alias profile?

I run Drush 8.1.2 and have this drush alias profile of an older version: <?php $aliases['test_prod'] = array ( 'remote-host' => 'test.com', 'remote-user' => 'test', 'root' =&...
2
votes
1answer
824 views

drush/drush dev-master requires codegyre/robo ~1.0.0-beta1

I'm transitioning a Drupal 6 site to Drupal 8.1 so following the official instructions, I set up a new install in its own directory. Since this is only one site, I followed the instructions to put my ...
0
votes
2answers
17 views

Composer download Drush 9 - But conflict errors

I just installed drush 7 and 8 in their own directory under /usr/bin as drush7, drush8 commands. Now I'm trying to do the same for drush9, but I'm getting a conflict error during the composer download ...
0
votes
2answers
46 views

Where can I download the Windows installer for Drush?

I cannot find the link where to download Drush windows installer. Can anyone tell me if there is or how to do? I am using Drupal 8.1 and Windows 7.
0
votes
2answers
34 views

Drush with a dockerized Drupal install

I'm trying to setup a development environment for Drupal using docker. I've already succeeded on creating a PostgreSQL container and a Drupal container using official images for both, and I can ...
1
vote
2answers
67 views

Problem uploading files and images containing spaces in the filename

In Drupal 8 I have fields of type File and Image, inside Content types and forms. These fields stores files inside the "public" folder. When I upload files with a name containing spaces, for example ...
3
votes
1answer
32 views

8 - Is there a drush command to reset a module's config back to install defaults?

I'm working on a custom module in Drupal 8 and have nested the config a bit, but getting errors and want to just reset the config for that module completely.
0
votes
1answer
53 views

Upgrading Drush 6 to Drush 9 on Centos 5 server

I haven't updated drush in awhile and looking to update it to the latest. I'm not exactly sure how it was installed originally. But when I do a which drush, it shows it resides in /usr/bin/drush When ...
0
votes
2answers
23 views

Running Drupal API Scripts offline

I want to run some maintenance scripts against a Drupal 7 system. These scripts will call the Drupal API to use things like EntityFieldQuery, node->save and so on. I could create a module called ...
1
vote
1answer
15 views

How to make commands invoked by drush_invoke not to fail after adding extra option?

I've added new option into drush command as suggested here: function hook_drush_help_alter(&$command) { if ($command['command'] == 'features-revert-all') { $command['options']['cleanup'] = '...
0
votes
1answer
11 views

How to add extra option to the existing drush command?

I'm trying to add extra option to the existing command as below: /** * Implements hook_drush_command_alter(). */ function MYMODULE_drush_command_alter(&$command) { if ($command['command'] == '...
1
vote
1answer
28 views

How to overridden command via hook_drush_command_alter?

I'd like to override command using hook_drush_command_alter before run as below: /** * Implementation of hook_drush_command_alter(). */ function policy_drush_command_alter(&$command) { if (...
2
votes
5answers
172 views

Why doesn't 'drush cc all' work?

I installed Drush, but most of the commands doesn't work, I guess. I tried drush cc all and got the following output: Command cache-clear needs a higher bootstrap level to run - you will need ...
0
votes
1answer
63 views

Drupal integration with external binary program to convert an image?

Using Drupal 8. On a cloud based site, I have a program for converting images into svgs that takes, at times, a few hours of run time. I can easily run the external binary program (configured to run ...