Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
21
votes
12answers
37k 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:...
10
votes
1answer
6k 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 ...
2
votes
1answer
418 views

Memory Exhausted after Drush install [duplicate]

I've made a drush install of drupal 7.28 on my AWS server. I can confirm that the memory is set to 128M, all green on the reports -> site status page. The website will function normally and ...
16
votes
1answer
3k views

How to effectively manage a site with Drush make?

What things are important to consider when managing a site using Drush make?
10
votes
6answers
6k views

Drush installed and running; No Drupal site found even with uri specified

After much trial and tribulation, I thought I had drush all ready to roar. Much excitement. But then, no joy... Drush is working. The sites operate fine via MAMP. Regardless, a "drush cc all" command ...
14
votes
5answers
5k views

What is the correct composer based core update workflow?

I want to use composer to manage Drupal 8 dependencies, but I'm not sure what is the right core update workflow. At the moment I'm using drush to update core to latest beta release, but I also have ...
28
votes
7answers
37k 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($...
8
votes
5answers
11k views

The PHP version is not correctly detected

I'm running Drush on a host that has multiple versions of PHP installed. By default, php --version would give you 5.2.x, but php53 and php54 are also available. So in my .bash_profile I have alias php=...
52
votes
3answers
33k 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 ...
13
votes
2answers
30k views

How to uninstall drush via composer?

There is method of installing drush via composer: composer global require drush/drush:dev-master But how to uninstall it using composer?
3
votes
2answers
459 views

Having multiple Drush instances for different core versions

So in my environment, I have some websites on Drupal 7 and some on Drupal 8, and since the latest Drush 9 works with Drupal 8.4+ I was wondering if there's a way to be able to have both Drush 9 and (...
14
votes
14answers
16k 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?
3
votes
1answer
2k 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 ...
14
votes
2answers
7k 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. ...
4
votes
1answer
3k views

Drush from GitHub stopped working

I have a Github clone of drush that has been working since it moved there. I did a git pull this morning, and am now getting errors: $ drush Warning: require(/home/mpd/drush/vendor/autoload....
16
votes
5answers
30k 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 ...
12
votes
3answers
15k views

Running Drush returns an error

I am running Drush version 6.2.0 and the latest Drupal 8 beta on Dreamhosters. When I run drush cc all within the sites directory, I receive the following error immediately after executing the command:...
2
votes
1answer
463 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 (...
1
vote
2answers
729 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
80
votes
5answers
36k views

How to take a site offline using Drush?

How can I take a site offline using Drush?
9
votes
4answers
2k views

(dis)advantages of staging dev->production using 'drush rsync' vs 'git'?

I set up a Drupal site under git control for development work. It's parented in a master, bare GIT repo, and as changes are made in my various project-work git clones, and pushed back to the master, ...
9
votes
4answers
9k views

execute drush command from devel/php drupal

Can any one please tell me how can I execute drush command from devel/php? I can execute PHP codes from devel/php. But I don't know how can I execute drush command from devel/php. (As we know "devel/...
10
votes
2answers
4k views

What could cause remote drush commands to fail with ssh errors when ssh works in all other cases?

I have public and private ssh keys on all of my three servers (dev, UAT, & production) so I can log in remotely, or from one to another. Everything is working perfectly for the ssh and scp ...
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 ...
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 ...
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 ...
8
votes
2answers
2k views

Can't update drupal core to 7.27

I'm tring to update using drush, with the command drush up, but core is not updating. it says on the drush output: Project drupal was updated successfully. Installed version is now 7.27. but it's ...
3
votes
6answers
2k views

Drush Open_BaseDir Error

I keep getting the following error, although I've turned off SafeMode in my .ini file, and confirmed it's off with a PHP status page. The following restricted PHP modes have non-empty values: ...
3
votes
2answers
9k views

Updating Drush with Composer

I've been using Drupal for several years, but only just dipping a toe in with Drush - I've bought an ebook tutorial and working my way through. I've installed Composer, and used it to install 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. ...
8
votes
4answers
5k views

Can Xdebug be triggered by Drush commands?

I'm running into an issue with my Features modules and installation profile when installing the site with drush si. There are a number of probably related issues in the Features issue queue, but none ...
5
votes
2answers
760 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 ...
3
votes
2answers
8k views

Drush is not able to bootstrap [closed]

I installed Drush 7 using Composer, and I created a Drupal 8 running on XAMPP on Windows. H:\xampp\htdocs\d8_test is the Drupal root. Location of settings.php file is H:\xampp\htdocs\d8_test\sites\...
3
votes
2answers
2k views

How do I update a Drupal distribution to a newer version?

I am looking at using http://drupal.org/project/commons , but I am not sure how easy it is to update a distribution when a new version comes out. Also, can I use drush to do it, or do I have to ...
30
votes
2answers
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 ...
83
votes
10answers
55k views

How can I change a user's password?

How can I change a user's password from the command line using Drush?
34
votes
2answers
22k views

Drush command to show aliases?

Is there a drush command to show existing aliases? Some Googling didn't turn up anything.
20
votes
3answers
12k views

Import a single yml configuration file

Is it possible to import one single yml configuration file by specifying its path? Or a group of yml files contained in a specific module?
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 ...
19
votes
5answers
928 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 ...
12
votes
6answers
6k 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?
10
votes
3answers
499 views

What is the easiest way to install clean Drupal from scratch using drush?

What is the easiest/quickest way to install clean Drupal from scratch on empty folder for testing purposes by using drush (without resorting to shell scripts or aliases).
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 ...
11
votes
0answers
10k views

How to configure Drush on Windows 7? [closed]

I'm working on drupal in Windows environment. Most drupal developers recommend to use Drush. I know it is a very useful command line tool for drupal development. I downloaded the Drush installer for ...
14
votes
1answer
13k views

Why does drush say “command not found” when I try to execute remote commands? [closed]

When I use a drush command to do something on a remote machine, I get the following message: bash: drush: command not found What's the problem?
9
votes
4answers
3k views

How do I use “drush make” modules with a local module code?

I got to love the workflow "drush make" gives us. I am sure there are others who would want their development code to be put into a make file with it not being ready for drupal.org, for example, ...
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 ...
4
votes
1answer
5k views

How do I use Drush correctly to restore a site via the arr command?

I am having an issue with the Drush arr command working correctly. I use drush to backup an archive on a testing server and then move it to a live server, or vice versa when needed. Here is a ...
3
votes
4answers
3k views

How to access a remote site using the command line (with drush)?

I don´t know how to use drush nor the command line, so I´ve started to read some tutorials, and watch some videos. I´ve installed the drush windows installer, because I have windows. The thing is ...
11
votes
1answer
4k 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 ...