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

3
votes
1answer
23 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
35 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
19 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
13 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
9 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
21 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
4answers
85 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
0answers
14 views

Drupal integration with external binary program to convert an image?

On a cloud based site, I have a method for converting images into svgs that takes, at times, a few hours of run time. The workflow should have the user submit the image and have the image stored to ...
0
votes
1answer
6 views

Drush make and multisite

I am building a multisite and each sub-site may have its own contrib modules. For example: sites/all/modules/contrib/entity sites/site1/modules/contrib/views sites/site2/modules/contrib/services I ...
0
votes
1answer
17 views

Fluch cache on all sites in multisite platform

Is there a way to clear cache on all sites in platform by using platform alias? For example, drush @platform_name cc all ? (its multisite setup via aegir). The problem I am facing with is, when I run ...
0
votes
1answer
25 views

Choose a destination after drush cex

In my sites/default/settings.php I changed: $config_directories = array( CONFIG_SYNC_DIRECTORY => 'sites/default/config-sync', ); I created the folder config-sync in sites/default/ When I do ...
0
votes
0answers
57 views

Couldn't use Drush on Ubuntu 16.04 [closed]

I just installed Ubuntu 16.04 and Lamp stack, I installed drush 6 then 8 , both of dosn't dowload Drupal, it gives me this errors : PHP Fatal error: Uncaught Error: Call to undefined function ...
0
votes
0answers
15 views

Running a Ubuntu 14.04 server and need to find Drush and update it to the latest

I just came onto a new project and its running a Ubuntu 14.04 server. I need to locate drush and update it. What does one have to do to locate where drush is running from and how do I go about ...
1
vote
1answer
31 views

Installing drush for use with Drupal 8

I have now found two instances where it seems I will finally need to learn how to install and use drush for my new drupal 8 site. I've been avoiding drush the last 5 years working with drupal 7 ...
1
vote
1answer
12 views

How to alter command being run by drush_invoke?

When you run drush features-revert-all command, it can be altered using hook_drush_command_alter (&$command). However during run it's invoking another command by: drush_invoke('features-revert', ...
1
vote
2answers
13 views

Force Drush8 to Download Drupal 8 Module on a Remote D7

Anyone happen to know, how to force download d8 module to remote d7? I tried doing the following and still letting me to choose 7s. $ drush @remote.dev dl --default-major=8 composer There are no ...
1
vote
0answers
13 views

Does running `drush rf` detect needed updates by look at the version of files on disk or by an entry in the database?

Does running drush rf detected needed updates by looking at the version of files on disk or by an entry in the database? We run in a load balancer, fail over situations on a some production server. ...
0
votes
2answers
29 views

How to bulk create many sites using one platform in Aegir

I a plan to use Aegir (part of a BOA server) to host many sales sites, one site for one product. I would like to know how to bulk-create 1000 sites using an existing platform in Aegir. This ...
1
vote
1answer
15 views

drush sql-dump skip extended inserts?

Does drush have an option in its sql-dump command to skip extended inserts? I am looking for a particular value in the database, and having shorter lines would be a boon for my task.
0
votes
1answer
28 views

Where does the drush installtation command set the PROMPT_COMMAND variable?

I installed drush and as part of the installation it makes some changes to the command prompt. ... # Optional. Enrich the bash startup file with completion and aliases. drush init ... Whenever I ...
2
votes
1answer
29 views

Applying Patches to Drupal 7 modules - How to deal with error messages?

I am trying to apply patch #110 from here in Drupal 7 - ViewsCalc. I am following the instructions on this page: Applying patches on Mac OS X When following the instructions, I get this error ...
0
votes
1answer
17 views

How to override logic of specific drush command? [duplicate]

I'm aware of validate/pre/post COMMAND hooks and I would like to replace the logic of the existing drush command on specific condition using policy commandfile with something else, e.g. /** * ...
0
votes
2answers
53 views

drush pm-update “File drupal6-eol is corrupt (wrong md5 checksum).”

PHP version 5.3.3 Scientific Linux release 6.5 Carbon (like CentOS/Redhat) Can't update a Drupal 6 site using Drush 6.x. Installed Drush 6.x using composer. "drush pm-update" produces the following, ...
1
vote
2answers
33 views

Drush unable to untar Drupal 8

Something has happened to my Drush and I've run out of ideas. It is unable to untar drupal-8.0.6.tar.gz. I discovered this while trying to update a site but it's nothing to do with the site because ...
3
votes
1answer
46 views

How I change my Site URI in Drupal 8

In Drupal 7 I put in settings.php this: $base_url = 'http://mysite.local'; And when I run: $ drush uli http://mysite.local/user/reset/1/1460387746/mTqwCdJ7hi_pmrPRuFOScYwFtoHTmVAW07MV23O3UVk/login ...
0
votes
0answers
24 views

drush updatedb -y , get Drush command terminated abnormally due to an unrecoverable error

My sites was setup with multiple sites using one single core drupal module I try to update site1, site2 with this command drush updatedb -y I get the success message but for site3 with the same ...
2
votes
1answer
61 views

How to install Drupal 8 with custom language using Drush 8?

I know I can install a new Drupal web site with: $ drush dl drupal --drupal-project-rename=[project] $ cd [project] $ drush site-install standard \ ...
0
votes
1answer
42 views

Drush 8 raises an error while running 'drush runserver'

I just installed Drush (globally) as described here: http://docs.drush.org/en/master/install/, on Ubuntu 14.04 (PHP 5.5.9). Then I created a new Drupal 8 web site and database with: $ drush dl ...
1
vote
1answer
36 views

Drush sql-sync not placing file in specified dump-dir

I have a dev and staging alias setup for drush and they are both working correctly. I included a reference to where I want the dump file placed during a drush sql-sync using 'path-aliases' => ...
3
votes
1answer
39 views

Having issues upgrading from Drush 6.3.0 to 8.0.5

We have been successfully using Drush, latest version 6.3.0. In order to obtain Drupal 8 support, I am trying to upgrade to Drush 8.0.5. First I located the 8.0.5.tar.gz file and tried getting ...
0
votes
1answer
25 views

drush sql-sync doesnt extract gzipped sql

I run the following command from a script: drush -v sql-sync @tmp.stage @tmp.coe | tee ./sql-sync.log My @tmp.stage server is Drush 7.0 and @tmp.coe servers is Drush 6.2.0 An SQL dumpfile is ...
1
vote
3answers
24 views

Numerous dependencies don't get installed with “drush en -y” command for rooms module

I tried to install the rooms module, obviously a very complex module with lots of dependencies, I tried with drush: drush en rooms -y This is the module: https://www.drupal.org/project/rooms But ...
1
vote
0answers
16 views

Create a .make file task in Bamboo by using Drush for a Drupal project

I'm setting up a CI system by using Bamboo. My aim: As soon as a change is pushed to the bitbucket server, the next task will create a ".make" file using Drush. Bamboo is also found on the same ...
3
votes
1answer
95 views

How to disable modules in D8 programmatically

In Drupal 7 it was possible to disable modules via admin interface or via Drush drush pm-disable. In Drupal 8 the checkboxes are greyed out in the admin interface and Drush is not able to disable them ...
0
votes
0answers
21 views

How do I delete Feed Aggregator items before fetching new ones?

I'm using the "Feed Aggregator" module to fetch items from certain RSS feeds and display it in a block on a website (using views). One of those feeds isn't sorted chronologically, but rather on a ...
4
votes
1answer
42 views

How to execute a VBO using Drush

So I want to execute a VBO using drush, taking advantage of vbo-execute command to change my workflow state in my views, based on few resources I found this is the command I'm using: drush ...
1
vote
0answers
16 views

Libraries not found when installing from custom profile

I've created a custom Drupal installation profile which has the epsacrop project included in the makefile and as a requirement in the .info file. Also, the epsascrop project requires two libraries: ...
0
votes
1answer
107 views

Drush and Composer installed but I'm getting errors

Trying to use any drush command I get an error saying autoload.php won't load. It's in the vendor folder which is in the web root where I'm pretty sure it's supposed to be. It also has chmod +x ...
0
votes
0answers
53 views

Drush 8 / Drupal 8 fatal error class not found exception AccountInterface

I have a Windows 10 PC, using git-bash as terminal window to run drush. Drush is installed in c:\users\myname\appdata\roaming\composer\vendor\drush\drush. My apache server (using xampp) is on the d ...
1
vote
3answers
54 views

How to set up drush on Cloudways / Digital Ocean?

I have been experimenting with Cloudways and Digital Ocean as a hosting solution. I am attempting to set up Drush and have been following some instructions provided by GoDaddy. The notes appear up ...
0
votes
2answers
23 views

How to call helper function from my_module.admin.inc file in drush command?

I have some function in the mymodule.admin.inc file that i want call from a drush command and i have done the following below in the mymodule.drush.inc function mymodule_drush_command() { ...
3
votes
1answer
34 views

Clear cache tables

I installed a 'test' theme and then uninstalled it. I ran drush cache-rebuild and I also cleared all caches in the Configuration->Performance menu. However when I run drush config-export, to export my ...
0
votes
2answers
56 views

Why does nothing change when I attempt to restore a backup?

I have a drupal 7.43 installation and it has been doing regular backups using the Backup and Restore module. I wanted to do a restore but I'm blocked at every turn it seems. I go to Configuration >> ...
0
votes
0answers
46 views

Drush hangs only when executing a command on a remote machine

I am trying to use Drush to synchronise a local dev version of my Drupal site and I've set up the following alias file (spc.aliases.drushrc.php) in my .drush directory to allow Drush to connect ...
1
vote
3answers
42 views

How to create nodes from shell script at server?

I need to create nodes from shell script at my server (some server statistics). As I know drush cannot add new node. (It was a discovery for me) So I think make shell script which will create CSV ...
0
votes
1answer
31 views

Can I deploy my Content on drupal using scripts?

If suppose I have a drupal application in Github and I have automated drupal installation using chef. Now I want to deploy that application content such that i can see it on my content page. I am ...
0
votes
1answer
20 views

How to properly call drush command from another drush command?

I have a drush command that does some stuff and at the end of its execution I want to invoke twig-compile --uri=foobar.com. When I call drush_invoke('twig-compile') I get error about unknown ...
0
votes
0answers
11 views

Unable to install drush on centos 7 [duplicate]

============================================================================ Error executing action run on resource 'execute[drupal-make-drush-install] ...
0
votes
0answers
49 views

Drush does not work after I sudo su to another user

I have a CentOS 6 server with WHM/cPanel. I installed a global Drush as root using the instructions here (http://docs.drush.org/en/master/install/). Drush works fine for any user I ssh in as. However ...
0
votes
1answer
11 views

Some drupal database operations won't complete

On a development server (and it's sister staging server), I'm not sure how I got myself into this situation. When running drush updatedb I get this error below. $ drush updatedb The following ...