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
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
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
4answers
988 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 ...
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
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 ...
4
votes
3answers
10k views

How to use Drush in remote server?

I'd like to use drush methods in the remote server. As far as I know I have to install Drush in the remote server. But my server provider tell me that Drush has many conflicts with other modules that ...
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
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
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 ...
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 ...
1
vote
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://...
13
votes
3answers
8k 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?
10
votes
1answer
10k 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 ...
9
votes
2answers
6k views

Drush PHP syntax error when running

I am following the instructions to install Drush that are listed on this page: https://github.com/drush-ops/drush/blob/master/docs/install.md I seem to be getting a syntax error within the code: [...
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
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['...
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
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
1answer
2k 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 ...
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
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
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.
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 ...
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
609 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
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 ...
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
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
481 views

Is it normal that Drupal enters maintenance mode during a module update?

I have created a custom module with an .install file, which includes some hook_update_N() and hook_update_N(&$sandbox) update hooks. These are used to update a collection of existing nodes. ...
2
votes
1answer
144 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
989 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
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
3answers
1k views

Can't get drush to work after moving to Acquia Dev Desktop

I installed Acquia Dev Desktop. Most things work but drush does not. I get an error: Drush was not able to start (bootstrap) the Drupal database. Because I had previously installed php and mysql on ...
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
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 ...
1
vote
2answers
3k views

Error when updating modules with Drush

Iv managed to install Drush to the site on Go Daddy shared hosting(thanks to the greate tutorial!). Simple commands run without any errors, but when I try: drush pm-update ctools It returns: -...
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
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
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
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
1answer
2k views

drupal 6 to 7 site upgrade using drush_sup - how to download compatible drupal 7 modules

I used drush_sup to upgrade my drupal 6 to 7 site. everything went smooth except the drupal 7 modules were not downloaded to the upgraded website. During the upgrade process it did list the installed ...
0
votes
2answers
2k views

Drush migrate commands do not appear after fresh drupal 8 install using composer

I am trying to follow the upgrade using drush tutorial but I cannot get the migrate commands to appear in drush. On a new Ubuntu 16 box I do: #install a new drupal 8 composer create-project drupal-...
0
votes
0answers
407 views

Command “webform-libraries-download” is not defined

Suddenly the command in the title decided to stop working. [Symfony\Component\Console\Exception\CommandNotFoundException] Command "webform-libraries-download" is not defined. I'm on Drupal 8.4.2 ...