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
8
votes
1answer
4k views

how to install package via composer?

I would like to add library to my drupal 7 custom module. Library can be installed via composer, but i can't find a solution for install? How can i install this library? I have installed "composer ...
8
votes
9answers
3k views

How to handle enabling new modules with Drush via makefile

At work we are moving to getting our new sites set up in git and doing local development. So far I've created a drush make file along with an installation profile, and I have this scripted via puppet ...
7
votes
3answers
10k views

Drush module version

Is there a way for drush to print out what module version for a module that is currently enabled? I'm not looking for trying to find what version of drush is. I end up doing it the janky way: drush ...
7
votes
4answers
974 views

How to adapt the name of a custom Drush command?

I saw the interesting answer to the question about "How can I get a list of content types with drush?", which starts like so: You can create a drush command named content-type-list. But I wonder ...
7
votes
4answers
2k views

How do you include a Dev module in a make file?

I am using Drush make files to automate my site development. I have followed this tutorial to create a Make File via Drush. Everything works fine, except when I run the make file, Drush says it ...
7
votes
3answers
16k views

How to run a Drush command with the full site path?

Im trying to get Drush working. When I type 'drush' into terminal I get a list of commands so I know its installed. I dont have any path aliases set up yet so im trying to use the full path. When I ...
7
votes
1answer
4k views

Why drush “assume yes” -y option do not work for some commands

Drush has global option -y (or --yes) which allow you not to type y on every promt during given command execution. (There is also -n or --no option to which following applies as well.) This works ...
7
votes
1answer
6k 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 ...
7
votes
4answers
1k views

How to get list of module folders which can be deleted safely?

I've uninstalled a lot of unnecessary modules recently through admin/modules/uninstall. Now I want to understand what folders of the modules can be deleted from sites/all/modules. I've tried drush ...
7
votes
4answers
3k views

How to manage user permissions?

I would like to manage user permissions with Drush, but I don't find any command on the official documentation website. How to achieve this? I am using Drupal 6, and Drush 6.0-dev.
7
votes
7answers
4k views

How to delete all terms in a vocabulary with drush?

As reported here I have big problems with huge vocabularies in Drupal 7. Now I want to empty the big vocabularies, but I can't do that via the admin interface, because its running out of memory, so it ...
7
votes
3answers
3k views

Drush command to list ONLY modules which need an update

Drush 8.1.9 & Drupal 7.53. What I'm looking for is a command like 'drush ups' but without all the modules that are [OK] - so when used with an alias of several sites I don't have to scroll ...
7
votes
3answers
8k views

Undefined error: 0 OR Unable to load autoload.php. Drush now requires Composer

I've installed drush in /usr/local/lib/drush/drush and composer in /usr/local/bin/composer. When I try to run drush /usr/local/lib/drush/drush I get the following: /usr/local/lib/drush/drush: line ...
7
votes
2answers
3k views

Add a block to a region using drush

How can I add a block to a region using Drush? I'm using Drupal 7.0 and Drush 4.3.
7
votes
4answers
4k views

How to pass argument to php file using a drush command?

I've small php script in my public folder called sample.php. I run this file using drush command drush scr sample.php. I want to know how to pass argument to php file using drush command and how to ...
7
votes
1answer
6k views

Drush post-installation - where can I find drushrc.php?

Just getting my first hands-on with Drush 5.1. The stuff works and is very promising as per how modules can be installed and enabled. One question though. Where should I look for the drushrc.php file ...
7
votes
2answers
4k views

How to choose what tables to skip for drush sql-sync @dev @staging?

Following my previous question How to set Drush sql-sync not to clone users between @dev and @staging? I have manually preselected over 80 tables that should not be automatically synced (content, ...
7
votes
1answer
4k views

Using Drush make to install a profile

I use make files for a number of different flavours of sites that I build, then manually insert my own profile into the site/profiles/ directory. Can drush make download and automatically insert the ...
7
votes
2answers
2k views

Drush command to check if Drupal is installed?

Is there any way to use Drush to determine if Drupal is installed, and have it return true or false? The boolean output would be used elsewhere in a bash script's logic. Bonus: it needs to work for ...
7
votes
2answers
7k views

Controlling remote Drupal sites with Drush

For a couple of weeks now I have been watching various screencasts and envying those who can operate Drush on their sites, esp. when enabling/disabling of the modules, or clearing cache. The time ...
7
votes
1answer
1k views

How can I get major version updates with drush pm-update?

I often check for updates to my modules using drush pm-update. However, this check does not check for succeeding major versions. For example, if I am using Mollom 1.1, drush pm-update will not alert ...
7
votes
2answers
761 views

Developing sites while using Aegir and Drush make

I read this article from mig5.net about 'Drupal deployments & workflows with version control, drush_make, and Aegir'. I am impressed by the efficiency of the workflow described here, and I really ...
7
votes
1answer
138 views

Is there a good reason to prefer one method of installing over another?

Starting to play around with drupal 8. My first method of installing was installing drush8 (as mentioned in https://www.drupal.org/documentation/install/download): Get drush8: composer require ...
7
votes
0answers
11k views

How do you Drush reset an administrator password? [duplicate]

How do you Drush reset an administrator password after forgetting the pass and losing its email?
6
votes
1answer
7k views

PDOException: SQLSTATE[HY000] [2002] No such file or directory in _registry_check_code() [duplicate]

Drush is running on MAMP, PHP 5.6.6. Inside /Volumes/Doxy/htdocs/omegadoen/sites/all/themes/omega I run: drush omega-wizard I get: Additional uncaught exception thrown while handling ...
6
votes
6answers
2k views

Is there any management utility for multi-site deployment?

I'm creating a multi-site instance for a client that makes heavy use of Webform. It's going to be a survey tool of sorts with a single base domain (no sub-domains) and a single SSL certificate. I'...
6
votes
2answers
11k views

drush cc all != “Flush all caches”

If I try and clear my drupal site's cache using drush cc all command - the command completes successfully but when I pull up my drupal site in a browser its a mangled mess because there is no CSS. ...
6
votes
6answers
6k views

Stuck. Installing Drush via Composer not working

It looks like I installed Drush, following the directions in the documentation. Here's what I did. Jens-MacBook-Air:~ jensimmons$ composer --version Composer version 1.0.0-alpha8 2014-01-06 18:39:...
6
votes
3answers
18k views

Drush command to uninstall from enabled…?

Is there a command for Drush so I can uninstall a module from the enabled state? I hate having to drush dis mymod -y (and) drush pm-uninstall mymod -y
6
votes
4answers
1k views

How to distinguish between drush and HTTP request

How can I distinguish whether a function is called from drush or by a real HTTP request?
6
votes
3answers
3k views

where to find the variables that can be changed through drush vset

There are several variables which we can change through drush vset command like changing the file_temporary_path, maintenance_mode, user_register I just need to know, how can I know the relevant ...
6
votes
2answers
2k views

advantages of drush bam vs. drush sql-dump / drush sql-connect

Is there any comparative advantage in terms of best practice, ease of use, or speed in terms of using the drush back up and migrate command (drush bam) or is it just preference? I'm often using just ...
6
votes
4answers
9k views

How can I change theme?

I tried drush disable theme-name and afterwards drush enable theme-name, but it didn't work. How do you change theme with Drush?
6
votes
2answers
4k views

How to show available drush commands per module with a drush command?

For example I would like to see all the commands provided by the features module, I know I can do drush help | grep features But I don't feel safe doing this with all modules present there (you ...
6
votes
2answers
1k views

Change module settings stored in an array with drush

I would like to configure a module (addtoany) settings with drush. This is the variable: addtoany_nodetypes: Array ( [about_us] => about_us [contact] => contact [page] => page ...
6
votes
3answers
228 views

What are some ways to tell if you are currently on the same Drupal installation as your code?

Currently I have to manage a few servers and there are a bunch of Drupal directories that all look alike. I'm also logged in as admin on the site, but what I want to find out is: How can I tell if I'...
6
votes
1answer
1k views

Using drush to run a local script on a remote site

I frequently use drush scr for little tasks throughout my day. Sometimes these end up a proper commands in my environment, but more often they are just standalone things. If I have @foo set up in my ...
6
votes
4answers
3k views

drush make: Specify subdir for make-files provided by contrib modules

Recently I started using drush make to pull in Drupal Core, all the required contrib-modules, themes and libraries. One of the modules I use is the geshifilter-module. This module comes with it's own ...
6
votes
4answers
1k views

Delete hundreds of nodes by ID programmatically

I am trying to remove 700 or so nodes from my Drupal 7 system (they are duplicates) and have a big list of node IDs in a text file. Have tried using Views Bulk Operations (VBO) but it doesn't allow ...
6
votes
2answers
2k views

drush updatedb on multiple sites

I have a multisite installation with common modules code (all modules are in sites/all/modules). When I update the modules, after that I need to update the database of each site with drush updatedb -l ...
6
votes
3answers
800 views

Can I use drush to compare the running modules on two sites on the same server?

Is there a way to use drush to compare the list of running modules on two Drupal 6 sites? I have two sites running locally (with two code bases if that matters) with different modules, but a very ...
6
votes
3answers
4k views

Drupal 8, clear specific cache

In Drupal 8 we have the command drush cr which is the new version of the deprecated drush cc all. However we had drush cc menu and some more specific cache clear commands. If I try to execute them, I ...
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
458 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
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
208 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
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
3answers
5k views

Drush Make for a custom module hosted at github

I am trying to fetch a custom module versioned at github.com via drush make, but I get Could not retrieve version information for custom_migration Non-existent project type on project ...