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
10
votes
2answers
4k views

How do I use Drush 8 site aliases in Drush 9?

In Drush 8, my site aliases are loaded correctly from ~/.drush/mysite.aliases.drushrc.php. E.g. $aliases['dev'] = array( 'root' => '/var/www/html/mysite.dev/docroot', 'uri' => 'mysite.prod....
9
votes
3answers
13k views

How to completely wipe and rebuild drupal menus?

A while ago I found a cool blog post that detailed how to empty the menu tables, and rebuild the menu system with a drush php call, a necessity since the site will be unusable after emptying those ...
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
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
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
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 ...
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
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'...
4
votes
2answers
5k views

Can you modify the settings.php file using drush?

I am trying to create multisites and the first one is up fine and running. I am trying to use drush to install a 2nd site but I need the settings.php file to point to a different db. Can I modify my ...
3
votes
5answers
10k views

Use Drush to update multi-site setup

I have a multi-site setup where 3 different sites share the same codebase. All of the modules are in the all/modules folder so they all have the exact same modules. I want to update the modules and ...
3
votes
2answers
3k views

How can I install Drush without Composer?

I've been trying to install Drush for a while but have failed. I have no experience in command line applications. I've seen quite a few tutorials: https://www.drupal.org/node/594744 https://www....
2
votes
1answer
542 views

Patch a module loaded by a distribution

I am trying to make an installation profile that inherits the commerce kickstart distribution. In order to get this to work, I need to apply a bunch of patches through drush make. First I have to ...
2
votes
5answers
3k views

Why would drush sql-sync fail to work?

I have a development server set up in my drush aliases as @dev, and a UAT server set up as @uat. I can successfully execute drush commands locally on both servers, and I can execute remote commands ...
2
votes
1answer
1k views

How to set Drush sql-sync not to clone users between @dev and @staging?

As I wrote in my previous question, I am using the following drush commands to synchronize development and staging environments. drush rsync @dev @staging drush sql-sync @dev @staging How to set up ...
2
votes
5answers
2k views

Difficulties install Drush using composer

I have tried to install Drush on OSX 10.9 but it doesn’t seem to have worked. In terminal ‘drush status’ gives -bash: drush: command not found I have followed the instructions on http://whaaat....
1
vote
2answers
4k views

Is it possible to run Drush without root?

I run a Linux server that is administered by a friend of mine, and at the moment I work with Filezilla. I've heard that Drush is a trivial installation: it seems to require no configuration and work ...
1
vote
2answers
3k views

How do i install drush for a drupal site which is on shared hosting? [closed]

I have a shared hosting account on which i have created sites using joomla 2.5 and drupal 7. I want to use drush to apply patches to existing modules for my drupal 7 site. Can any one guide me as ...
1
vote
3answers
1k views

drush open_basedir restriction in effect on media temple

I'm using drush on mediatemple grid service. I think i've got setup drush correctly. At least to my knowledge. I've been able to use it; but with nagging errors/warnings each time. And whenever i ...
0
votes
2answers
2k views

How do I convert a pre-existing site to a Composer-managed application?

The latest Drush 9.x version recommends that Drupal 8 sites will be built using Composer, with Drush listed as a dependency. However, when you install Composer and Drush globally per step #1 on http://...
0
votes
2answers
1k views

What is the right way of installing?

The http://docs.drush.org/en/master/install page states: Drush 9 only supports one install method. It requires that your Drupal 8 site be built with Composer and Drush be listed as a dependency. ...
12
votes
3answers
7k 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?
9
votes
2answers
2k views

How to use Drush's concurrent execution capability?

I am using Drupal multi-sites (single codebase, multiple sites/*). Along with this, I have started using Drush aliases to manage them: $ cat sites/all/drush/aliases.drushrc.php <?php $aliases['...
9
votes
3answers
2k views

Drush Scripting? Or Batch API?

We have an Ubercart website that handles large volumes of orders daily, processes them and runs other tasks like billing, delivery routing, and future order creation. Some of these tasks are heavy ...
9
votes
1answer
9k views

Use drush to put a site in maintenance mode [duplicate]

drush @mysite cget system.maintenance shows: message: '@mysite is currently under maintenance. We should be back shortly. Thank you for your patience.' langcode: en Drupal 8 uses state ...
8
votes
2answers
2k views

Updating modules with drush without breaking SVN?

Right, this has been breaking me for two days. I can't get an answer anywhere! I have drush 4.4 on my server. I am using SVN via Unfuddle.com. I have a site, I want to update a lot of modules. I want ...
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 ...
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 ...
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
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?
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' ...
4
votes
2answers
7k views

How to install drush 8 properly on Debian 8?

Finding hundreds of articles and documents about how to install drush and none of it explains where exactly and how properly I got a bit lost. I've got a Debian 8 system with a root user, NGinx and a ...
4
votes
3answers
4k views

Creating a new user role with Drush

I can do loads of user-related stuff with Drush, but I can't see how to create new user roles. Is it possible to do this with Drush?
4
votes
1answer
1k views

Should a site be in maintenance mode when running the Drush Up command?

I'm not asking if I can update my website with Drush. I'm not asking if Drush can make it in maintenance mode. My question is ... if I'm using the command drush up to update my Drupal core or a ...
3
votes
2answers
509 views

Run a drush command via module

Is there a way to run a Drush command using a module? I tried exec("drush ..."); but I have found out it is not recommended. Is there any other command I could use?
3
votes
3answers
10k views

How to install drush 8 properly?

I'm trying to install drush 8 via composer: composer global require drush/drush:dev-master (source) but it gives me drush version 7.0.0 which is without D8 integration... I'm using Linux Mint 17.
3
votes
2answers
3k views

How do I create a Zen's sub-theme using Drush?

I am trying to install Zen theme and create a new sub-theme from STARTERKIT. I am using the following Drush commands. drush dl zen drush cc all drush zen "Name" machine_name --description="...
3
votes
1answer
3k views

Exclude a single module from a Drush update? [duplicate]

Is there a way to exclude a module from a Drush update so it can be ignored when running eg 'drush up' ? I ask because Rules 2.8 is causing problems with Drupal Commerce but it would be great if ...
3
votes
1answer
2k views

Can I “drush rsync” with “chown @ destination”?

I understand that drush rsync is, by design, capable of preserving uid:gid. if I am synchronizing with drush rsync @site1 @site2, and uid:did exists on both site1, and site2, all is well. How would ...
3
votes
2answers
2k views

Drush on Windows 7 and WAMP

Is running DRUSH on a Windows 7 64 bit machine in a WAMP dev environment worth it? I've heard there are some speed and performance issues with this set up? Will I lose any functionality with this set ...
2
votes
2answers
1k views

Custom drush command not working

I have used hook_drush_command to create a new drush command. This is my custom code for creating drush command. /** * Implementation of hook_drush_command(). */ function mymodule_drush_command() { ...
2
votes
0answers
96 views

Why does Drush need the --uri option to return absolute URLs?

I want to execute a View and export the JSON file to the files directory. I am using Views Data Export and VDE drush add-on modules. My view has a file/PDF field and I want to provide a direct link to ...
2
votes
1answer
448 views

How to make Drush rsync @dev @staging exclude some directories?

I am using the following drush commands to synchronize development and test environments. drush rsync @dev @staging drush sql-sync @dev @staging How to setup drush to exclude certain directories (...
2
votes
0answers
969 views

Drush Fails to Connect to MySQL DB Server Using PDO SSL Options

Question: How do you force Drush to use all of the PDO options specified in a site's settings.php file? Background: I am using Drupal 7.22 with Apache and the Drupal files (and Drush 5.8.0) on one ...
2
votes
2answers
410 views

Git workflow for Composer-based projects

I would like to install/manage Drupal with Git, Drush, and configuration synchronization. Should I add core/ and vendor/ into the .gitignore so that instead of pushing/pulling core I simply update ...
1
vote
1answer
3k views

“Drush cannot find your database connection details”

I'm having an issue that is baffling to me as a new user and I'm hoping someone here can answer me how to fix the error. I'm trying to clone an existing drupal installation into a place on my mac ...
1
vote
6answers
6k views

How do I upgrade drush from 3 to the latest release?

On my debian 6 server, I used apt-get to install drush. However, it looks like it downloaded drush version 3. I want to upgrade to the latest stable release of drush (which I believe is drush 5). ...
1
vote
3answers
2k views

How to use Coder with Drush?

I have unsuccessfully attempted to find how to use the Coder module with Drush. Does anyone know how should I use it?
1
vote
2answers
2k views

Drush 5.9 - unable to untar

Using the command: drush arr ~/drush-backups/site.tar.gz --db-url=mysql://df_database:password@localhost/df_databaseuser --destination=~/domains/site.kz/public_html/temp (archive size is ~5gb), I ...
1
vote
4answers
3k views

How to run drush with cron (elysia cron)?

Problem I can't get cron (specifically elysia cron) to run with Drush. I've been using this as a guide. What have I missed/done wrong? My Crontab PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/...
1
vote
2answers
2k views

How to update core and all modules and themes from CLI?

On a LAMP environment I have a Drupal 8.5.6 website which is nearly all-core with the Bartik theme and a few stable contrib modules. Nothing is customized and I have daily backups so I don't "fear" of ...