Questions tagged [drush]

Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).

Filter by
Sorted by
Tagged with
6
votes
3answers
1k views

How to add the configuration changes from a website to another website?

This is what I'm trying to do: I have a website A where I make configuration changes and add other stuff. Now I create a website B. I would like to add the configuration changes from website A to ...
6
votes
3answers
494 views

How to get drush to work with xdebug — may have recently broken

I've been using drush with xdebug for years. It looks like it broke in the last two weeks, possibly due to modifications made to the core "drush" script (Split 'drush' script into finder, wrapper and ...
6
votes
3answers
4k views

How to install an existing Drupal profile with drush?

Seems like searching for the answer on Google just leads me to how to create make files and profiles. I know how to do that. I also know how to install Drupal with drush. But I want to install one ...
6
votes
2answers
8k views

How to target specific sites with Drush when using Multisites?

I have a Drupal Multisite set up. It contains two sites, but the core Drupal install has no site. With Drush, I can use @sites to target all sites. For example: drush @sites -y cc all - Updates all ...
6
votes
2answers
2k views

How to install a specific version of drush?

How can I install the a specific version of Drush, for example 5.9.0?
6
votes
2answers
209 views

What are the major differences between Drush versions 3 & 4?

What are some of the biggest differences between Drush versions 3.x & 4.x?
6
votes
3answers
2k views

How to run drush tests from the command line?

I installed drush via composer, initially drush 8 was installed. I then try to run tests via drush test-run command,unfortunately I get the following output indicating the command is not found. (...
6
votes
2answers
2k views

Drush @sites not implemented in drush 9

Since drush 9 (drupal 8.4 requirement), alias @sites does not seem to be implemented anymore (or yet ?). $ drush @sites cr The alias @sites could not be found. Is this a way to get the same behavior ...
6
votes
1answer
62 views

Create OS user specific Drush commands

I know how to create drush commands in a project, but there are a number of commands which I would like to add to my local system simply because they affect my particular workflow a lot. In Clisp, I ...
6
votes
2answers
4k views

How can I tell drush to use another php.ini file? [closed]

I've gone through the setup instructions on https://github.com/drush-ops/drush, but I can't seem to get drush to use a different configuration file, very frustrating. I've already added the PHP_INI ...
6
votes
1answer
79 views

Drush get all non-required modules

In Drupal, the Module Filter module adds four search filters to /admin/modules: Enabled Disabled Required Unavailable If "Required" is unchecked, the admin page will only show modules that are not ...
5
votes
5answers
4k views

Can drush show list all available modules?

With yum you can do yum list available ..., and know the name of the package you want to install. For example, there is the Mime Mail module in Drupal. What name should I use with drush dl, ...
5
votes
7answers
6k views

Drush installation problem - Non-empty values for magic_quotes_gpc

I have successfully installed and configured Drush and i am able to work with it. Unfortunately, I am getting an error like this: The following restricted PHP modes have non-empty values: ...
5
votes
3answers
3k views

“Uncaught ReflectionException: Class DOMDocument does not exist” error

On Ubuntu 16.04, I installed Drush using Composer: composer global require drush/drush:~8. Installation succeeded, but running drush --version, I got this error: PHP Fatal error: Uncaught ...
5
votes
3answers
2k views

Is it possible to do a drush sql-sync of only certain tables?

I have 4 environments between my local, dev, staging, and production. A large amount of content is published to the staging environment on a daily basis, so that is the center of my workflow. Once ...
5
votes
6answers
4k views

Enable new modules dependencies on deploy

How can I automatically enable new dependency added on a custom feature (or standard modules) with drush? After getting the new code, my deployment script basically run: drush cc all drush fra But ...
5
votes
5answers
8k views

After installing composer: “The drush command X could not be found”

Edit: re-wrote intro paragraph to highlight the installation of composer - I suspect composer may have broken drush. I want to test out elastic search with D7. I used drush to install a fresh D7 ...
5
votes
3answers
1k views

How can I setup Git/Drush dl/make caching of Drupal projects?

I'd like to setup the ability to have Drupal projects cached locally when I do a Git clone or Drush dl/make, so that if I happen to be offline or just to save bandwidth, when I Git clone/Drush dl/make ...
5
votes
3answers
3k views

Can I automatically regenerate all images after using Drush image-flush?

I used drush image-flush to delete all generated image style images on my site. I know that image style images are automatically regenerated when you try to view them in a browser, but is there a way ...
5
votes
1answer
456 views

How do I disable a module when Drush or the GUI doesnt work?

My site just gives a WSOD and throws this error: Error: Unsupported operand types in sites/all/modules/rules/includes/rules.state.inc, line 620 Since I can't even get to my site now without a WSOD,...
5
votes
3answers
2k views

How to make drush un-install modules without confirmation

I want to create a drush command that reinstall some modules. I've done something like this: $modules_to_uninstall = array("my_module1", "my_module2", "my_module3", "my_module4", "my_module5"); ...
5
votes
3answers
709 views

Is there a difference between “Clear cached data” button on the performance page and drush cc all?

Is there a difference in what caching is cleared between drush cc all and Admin > Site Configuration > Performance > Clear cached data button ?
5
votes
2answers
195 views

How to integrate the drush help --filter option with your custom module?

You can use the drush help --filter command to present a list of command categories to view. When you run the command: drush --filter=devel_generate you can see the following output: All commands in ...
5
votes
1answer
3k views

Changing theme in Drupal 8 via drush in the command line [duplicate]

In drupal 7 I used to just do a drush vset theme to change the theme in the command line, but that doesnt work in drupal 8 anymore. How would one change the theme in the command line for drupal 8 ...
5
votes
2answers
4k views

How to safely remove drush via pear and then install via composer?

I have drush 5 installed on my VPS running CentOS 6. Drush was installed using PEAR. Can I just remove the drush directory and the simlinks and then install drush 7 using composer? I have been ...
5
votes
1answer
2k views

Aliases stop working after composer install

We have added some drush aliases for a multi-site project, the aliases were converted from the previous syntax to the Drush 9 syntax (.yml files). I went over the documentation, and also saw the ...
5
votes
2answers
785 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 ...
5
votes
4answers
461 views

How do I programmatically create a list of new users?

I'm trying to use the following drush script, but I keep getting errors. Currently, it is not properly setting the user role to Premium. #!/user/bin/env drush <?php $users = [ "name" =&...
5
votes
1answer
7k views

Drush installed globally via composer as root user, but how to access Drush with ordinary user?

By following the instructions on the Drush git page: composer global require drush/drush:6.* I have Drush up and running (it seems to live in /root/.composer/vendor/drush/drush). But I imagine I ...
5
votes
2answers
5k views

Drush alias - @alias status could not be found

Problem I'm trying to create a drush alias following the excellent example posted here. EXAMPLE: $aliases['dev'] = array( 'root' => '/path/to/drupal', 'uri' => 'dev.mydrupalsite.com', )...
5
votes
2answers
4k views

Does the drush up command work on multisite?

I have to update all sites on a D7 multi-site installation. I normally deal with single installation and I use drush up to update the core, modules and db. I have no prior experience with a multi-site ...
5
votes
3answers
2k views

Update module with Drush + commit with Git

What's the best way to update a module and commit with git? Currently I'd use drush pm-updatecode then inspect with git status. The problem then is there are many files that have changed, been added ...
5
votes
3answers
1k views

how to display the machine name of module at /admin/modules?

I use Drush to enable and disable module, to do this I need to know the machine name of the module. At /admin/modules I can see the list of modules, but this list doesn't show the machine name, jut ...
5
votes
1answer
3k views

What is the purpose of key_value_expire table?

In Drupal8, what purpose does the key_value_expire table data serve? Can that be excluded from a database backup? I ask because, during development, I backup the database using "drush sql-dump --...
5
votes
1answer
467 views

How do you disable modules in bulk via Drush matching a specific pattern?

Currently I have to disable all of the ubercart modules in bulk, but there are too many of them to do it one at a time via the modules page. And doing it via drush doesn't disable every module related ...
5
votes
1answer
1k views

In Drush what is the difference between ard and arb?

In Drush what is the difference between ard and arb commands? When should I use one over the other?
5
votes
1answer
1k views

When running DB updates, in what order are module update hooks called?

I'm watching a Drupal 6 to 7 upgrade run, wondering at the order these updates are called. Aside from being in numeric order per each module, it seems that the module updates have been combined and ...
5
votes
4answers
7k views

How to push changes from a dev environment to prod

Our team of 10 developers would like to use Dev, Test, Staging and Production environments for our large site. How can we streamline pushing our changes from one site to another, keeping them as ...
5
votes
1answer
223 views

How do I drush vset a number with decimals?

drush vset latest_version 6.34a latest_version was set to "6.34a" So far so good. drush vset latest_version 6.34 latest_version was set to 6. Hmm... drush vset latest_version '6.34' ...
5
votes
1answer
2k views

What is the different between an install profile and a drush make file?

I am just getting into using drush and excited about using drush make and installations profiles. What is the different between a drush make file and an installation profile and do they /can they work ...
5
votes
2answers
3k views

Unable to load class \Drush\VersionControl\Backup

I keep getting this error : Unable to load class \Drush\VersionControl\Backup every time i attempt to update my Drupal install from 8.4.0 to 8.4.2. I am running the composer provided drush Drush ...
5
votes
4answers
4k views

No Drupal Site Found when clearing cache [duplicate]

I installed drush using composer following the instructions here: http://docs.drush.org/en/master/install/ When trying to run drush cc all I get this error: No Drupal site found, only 'drush' ...
5
votes
2answers
1k views

Updating core with Composer doesn't work

I am on D 8.3.0-rc2 and want to update to D 8.3.0 stable. Composer is my only option (requirement of address module). Composer core update doesn't bring me beyond 8.3-0-rc2, not even forcing it. ...
5
votes
4answers
4k views

How do I set the drush tmp directory?

I understand how to use /etc/drush/drush.ini; however, I don't know what exactly to put in there in order for Drush to use a different temp directory when creating an archive-dump.
5
votes
1answer
159 views

Why to use hook_drush_help() when we have 'description' in hook_drush_command()?

When you go to create new drush commands you can define the 'description' element inside the hook_drush_command(), and if you use drush help your_command you will see this description as output. ...
5
votes
2answers
453 views

Unable to debug drush command using xdebug with batch api

I have been debugging drush commands with xdebug and my IDE (currently PHPStorm 7) for a while, but I have been noticing that there are certain commands that die whenever I have the dubegger enabled ...
5
votes
2answers
2k views

standalone rsync and ssh work, but drush gets me a “Permission denied (publickey)”

I've got a production site (on shared hosting for now) of which I just want to have backups at this stage. and I've got a backup instance which I want to overwrite with the prod site. This is my /etc/...
5
votes
1answer
468 views

How to download the projects within a distribution using git, not just the distribution itself?

I've set $options['package-handler'] = 'git_drupalorg'; set in my .drushrc.php file. Now when I run drush make for a distribution (in this case, the 7.x-3.x-dev release of Commons), the distribution ...
5
votes
3answers
2k views

Is it possible to change the path of modules/themes installed using an installation profile?

I have a site which has a profile which downloads a number of modules using drush make. It adds the modules in the path /profiles/profile_name/modules. Is it possible in the make file of the profile ...
5
votes
0answers
489 views

How do I make an archived-dump of my site?

I have multiple versions of drush and cannot make an archive-dump of my site. drush8 ard/drush8 archive-dump returns [error] The drush command 'ard' (and/or 'archive-dump') could not be found. ...