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
102 votes
10 answers
95k views

How can I change a user's password from the command line using Drush?

How can I change a user's password from the command line using Drush?
markdorison's user avatar
  • 5,604
92 votes
7 answers
46k views

How to take a site offline using Drush?

How can I take a site offline using Drush?
markdorison's user avatar
  • 5,604
58 votes
3 answers
34k views

How to upgrade only core with drush?

There's a huge security leak in <7.32. So I want to upgrade all my Drupal sites asap without too much worrying about breaking stuff. But... $ drush dl drupal-7.32 It's forbidden to download ...
the's user avatar
  • 1,710
49 votes
5 answers
96k views

Drush command to download AND enable a module

To download and install a module, I run: drush dl module_name drush en module_name -y I put that in a Bash script function, and just call "drin module_name" to simplify. function drin(){ drush dl ...
radj's user avatar
  • 1,026
42 votes
1 answer
1k views

I need to bring a site to version control, and set up the continuous Integration environment

I am an entrepreneur with a Drupal 6x project that started small enough to not need version control (per developers), but now I am convinced there is no way without it. There's extensive documentation ...
druflex's user avatar
  • 523
41 votes
6 answers
64k views

How to check Drush version?

How can I identify what version of Drush is installed on a given system?
markdorison's user avatar
  • 5,604
39 votes
4 answers
49k views

Is there a way to manually run cron with Drush?

I want to be able to accomplish this: http://mywebsite.com/admin/reports/status/run-cron But it should be done through the Drush interface. Can any one help me out ?
David Csonka's user avatar
  • 1,136
36 votes
2 answers
29k views

Drush command to show aliases?

Is there a drush command to show existing aliases? Some Googling didn't turn up anything.
user1359's user avatar
  • 3,909
33 votes
7 answers
54k views

How to execute php script using drush?

I am new to Drush. How can I execute this script to remove comments of a specific user? $uid = xx // the spam users id; $query = db_query("SELECT cid FROM {comments} WHERE uid = %d", $uid); while($...
alfish's user avatar
  • 1,947
33 votes
7 answers
11k views

How do I prevent Drupal raising a segmentation fault when using a Node.js theming workflow?

Symptoms: Some drush commands fail; Some Drupal pages are blank. The failing drush commands report "Segmentation fault: 11" The Apache log (e.g. php-error.log in MAMP) also shows the same ...
iainH's user avatar
  • 1,374
30 votes
2 answers
5k views

How are drush and jenkins used together for continuous integration?

I hear the buzz words, "continuous integration", "drush" and "jenkins" often. Thus, sparking my interest. How are drush and jenkins used together for continuous integration? Also, why would you ...
chrisjlee's user avatar
  • 6,550
30 votes
4 answers
6k views

Memory-saving cache-clearing strategies for large sites?

One of my Drupal 7 sites has thousands of fields, a bunch of content types, more than 25 views, and hundreds (soon to be thousands) of profile types. Because of this, I'm using a core patch that ...
geerlingguy's user avatar
  • 5,483
28 votes
6 answers
26k views

drush updatedb for a single module

Is it possible to perform a single module's update function via drush? I can see drush updatedb which does not take an modulename as argument and runs all available updates. Then there is drush pm-...
nonsenz's user avatar
  • 1,956
27 votes
3 answers
20k views

How to list all available entity types?

How to list all available entity types in Drupal using drush? Related: How to get list of all node types?
kenorb's user avatar
  • 14.2k
27 votes
4 answers
9k views

Adding components to a feature via Drush

I understand using 'drush fu' to look for changes to any components of an existing feature, but is there a way to add a component to an existing feature using drush? Right now I have to use the /admin ...
tkrajcar's user avatar
  • 420
27 votes
4 answers
18k views

Determine whether module is enabled / disabled

I am trying to write a Drush script to enable a bunch of modules based on a hook. If it's already enabled, I would rather skip enabling that module. Is there a way for Drush to return whether or not ...
chrisjlee's user avatar
  • 6,550
25 votes
2 answers
13k views

Downloading core via command-line

I usually download the latest Drupal 7 using drush dl drupal --select, but but Drupal 8 doesn't get listed. What are some nice and quick ways of download the latest version of Drupal 8, even though ...
Patoshi パトシ's user avatar
24 votes
3 answers
5k views

Is it possible to download sandbox projects with Drush?

Normally, one can download a module from drupal.org like this: drush dl views However, this doesn't work for sandbox projects. Is there an easy way to download them or I am stuck with git clone?
Patrick Kenny's user avatar
24 votes
4 answers
3k views

Are Drush and Phing redundant?

I've installed JenkinsCI on our dev server to start automating our dev build and test process. I'm using Jenkins with the Git Plugin and some Drush commands via a shell script. When researching how ...
DKinzer's user avatar
  • 538
23 votes
12 answers
57k views

I've got `PDOException: SQLSTATE[HY000] [2002] No such file or directory` when using drush [closed]

I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal. Drush is giving me this error - I'm on an OSX box. dev5:...
Jack Ryan's user avatar
  • 2,297
23 votes
15 answers
24k views

Can I delete nodes of a given content type with Drush?

Just wondering if Drush is capable of deleting nodes of a given content type. Something like: $ drush delete-node --type=MyContentType If not possible, can I create a method like that?
chefnelone's user avatar
  • 6,237
22 votes
2 answers
68k views

How to disable a module and its dependents modules with Drush?

Is there any way to disable a module and its dependents modules with Drush. Let's say I need to disable views but I have enable views_accordion as well. If I run $ drush pm-disable views I don't get ...
chefnelone's user avatar
  • 6,237
21 votes
5 answers
10k views

Why would some features still show Overridden after a revert all --force?

Why would some features still show as "Overridden" even after running a full features revert with the force switch? Below are the commands I am running, for the sake of clarity. drush fr-all --force -...
markdorison's user avatar
  • 5,604
20 votes
5 answers
7k views

Order of drush commands for automated deployment?

What order should the following drush commands be ran? config-import updatedb entity-updates Also, I see entity-updates fail a lot due to field_delete_data* tables existing. How can I delete them as ...
Paul Canning's user avatar
20 votes
6 answers
12k views

Is there a drush script to disable all caches?

I mean all of the caching options under admin/settings/performance. I frequently use drush sql-sync to keep my development copy up-to-date with the server. However, the server must have all of the ...
Capi Etheriel's user avatar
20 votes
5 answers
10k views

Is there a way to get Drush to download all required dependancies for a specific module?

For example if you perform the following commands: drush dl views drush en views views_ui views_export You will get the the following error when trying to enable the views modules: Module views ...
Camsoft's user avatar
  • 3,139
20 votes
4 answers
4k views

Create a repeatable Drupal install?

When installing Drupal for different sites I find myself frequently installing the same modules over and over again. In the interest of DRY, how can I create a kind of custom site "template" which ...
User's user avatar
  • 1,723
20 votes
3 answers
19k views

Updating to a newer dev version of a module using Drush (ignoring point/recommended releases, without trashing version control)

[NB This question is off the back of, but separate/further to, an earlier question of mine, here.] I've been using Drush a good while, but every so often I get stumped. At the moment, I'm really not ...
NikLP's user avatar
  • 1,013
20 votes
1 answer
6k views

Where is archive-dump for Drush 9?

I have drush 9 installed (current dev release). I can't find the archive-dump command, despite the docs suggesting it should be there. Executing it produces: The Drush command 'archive-dump' could ...
Clive's user avatar
  • 167k
19 votes
2 answers
8k views

How can I tell Drush in which folder should a module be copied?

Is there a way to make Drush download modules into a specified folder besides sites/all/modules (e.g. sites/all/contrib, sites/all/core)? If this makes a difference, I am using Drush 4.4.
chrisjlee's user avatar
  • 6,550
19 votes
3 answers
12k views

What is the command that replaces 'drush variable-set'?

In Drupal 8 the Drush command drush variable-set no longer works. From reading (here) it appears that Drupal 8 has a new "configuration" system that replaces the old (Drupal <=7) "variables". But ...
Jeremy Davis's user avatar
19 votes
5 answers
987 views

Manage custom modules across multiple installations

We have some custom modules which are used for multiple sites. Those can't be released as contributed modules, for example because they are client specific, make assumptions that don't work for ...
Berdir's user avatar
  • 83.1k
17 votes
2 answers
48k views

How do I uninstall Drush?

There is a method of installing Drush via Composer. composer global require drush/drush:dev-master How do I uninstall it using Composer?
kenorb's user avatar
  • 14.2k
17 votes
5 answers
22k views

How do I list all the users?

I would like to list information about all users using drush. There is user-information, but it shows information only about single user. Are there any other solution?
kenorb's user avatar
  • 14.2k
17 votes
3 answers
11k views

What is the purpose of drush entity-updates?

After updating Drupal 8 modules, I have been warned on the Drupal 8 status page that: Entity/field definitions: The following changes were detected in the entity type and field definitions. ...
njp's user avatar
  • 727
16 votes
5 answers
38k views

Drush needs a higher bootstrap level to run

Do you have any idea on what might be causing this error when I execute: drush si geoslate --db-url='mysql://root:root@localhost/geoslate' --site-name=Geoslate Command site-install needs a higher ...
Andrew Welch's user avatar
  • 2,601
15 votes
6 answers
61k views

Drush command not found after Drush completely installed

I installed Drush 8 with composer. composer require drush/drush:~8 Unfortunately, error drush command not found after Drush completely installed. Why's the drush command can't be use? Installing ...
JJ12345's user avatar
  • 292
15 votes
5 answers
20k 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?
user avatar
15 votes
1 answer
9k views

How to dump a single table from database using drush?

I'm aware of mysqldump utility, but is there any way of dumping a single table from database using drush (e.g. for sql-dump, sql-sync)?
kenorb's user avatar
  • 14.2k
15 votes
10 answers
9k views

Where does PEAR install Drush? [closed]

I installed Drush using the PEAR option mentioned on the Drush project page, but I can't find the location of where it was installed. Does anybody know the default installation location? ...
James's user avatar
  • 745
15 votes
5 answers
15k views

Import po-files using Drush

I have about 20 sites that have a common translation. I don't want to go into admin of each site each time the po-file is updated. Is it possible to import a po-file using Drush?
D. Wroblewski's user avatar
15 votes
1 answer
4k views

How to effectively manage a site with Drush make?

What things are important to consider when managing a site using Drush make?
Letharion's user avatar
  • 27.5k
15 votes
3 answers
7k views

Use drush to download drupal core files directly into directory rather than subdirectory

When you use drush dl normally, it will download drupal into a subdirectory ie: drupal-7.16 I would like to skip creating the subdirectory and just install the drupal root directory files into the ...
bitfed's user avatar
  • 535
15 votes
4 answers
10k views

Run drush cron for a single module

Is it possible to run drush cron over a single module, something similar to "drush cron my_module"?
rfc1484's user avatar
  • 437
15 votes
4 answers
12k views

How to replace "default" with website domain name during drush user-login

When I run drush user-login username, drush prints a url like http://default/user/reset/1/32323933.... How do I replace default with the actual website name?
hpn's user avatar
  • 2,398
14 votes
6 answers
5k views

How can I get a list of content types with drush?

How can I get the existing content type list with drush? This will allow me to quickly produce a list. I've tried with: $ drush @d6 @sites genc --types But I need the devel_generates module ...
user avatar
14 votes
9 answers
6k views

Drush does not acknowledge release of new core update

I am trying to update my drupal 7.31 core to 7.32 via Drush. I ran the following commands $ drush pm-releases Project Release Date Status drupal 7.x-dev ...
Ibn Saeed's user avatar
  • 259
14 votes
1 answer
16k views

Setting a user as an administrator via drush command line?

How can I set a user to a specific role via drush? In my case I want to give the role of administrator to the user.
Patoshi パトシ's user avatar
14 votes
2 answers
6k views

Is is possible to call a function inside a .inc file of a module via drush eval?

I have a module with additional (.inc) files containing functions I need to run via Drush. I know it is possible to run drush eval, but when I try to do it for those functions I get the following ...
Michal Przybylowicz's user avatar
14 votes
6 answers
8k views

`drush cc all` command takes too long time, what can I do?

On a site of mine drush cc all takes more than 4 mins to run. The site db is a few GBs. However, I cannot see a clear reason as to why it takes too long. What can I do to locate the bottle neck?
awm's user avatar
  • 2,459

1
2 3 4 5
41