Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drush]

Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).

1
vote
2answers
647 views

Update website from 8.0.0 to 8.6.1

I'm pretty new to Drupal and I'm trying to update a website from 8.0.0 to 8.6.1. I've followed the guide here: https://www.drupal.org/docs/8/update/update-core-via-composer The composer part went ...
0
votes
1answer
871 views

Drush does not work invoking the local Drush

I have installed new D8 on a remote server using this way https://github.com/drupal-composer/drupal-project . I have pulled files from GitHub and I have run 'composer install' for getting the all ...
4
votes
4answers
4k views

`drush uli` generates correct link but results in 'Access Denied'

I have set up a Drush alias for my website (hosted on a shared hosting), the alias works correctly, because commands like drush status, drush cc all, etc. work. The problem comes with drush uli. It ...
20
votes
2answers
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.
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 ...
0
votes
1answer
19 views

Drush terminated abnormally

Drush version 9.7.0 Drush Launch version 0.6.0 Drupal ver 8.7.3 Open social dist 5.5. The error I get at the command line when running drush topic or drush cr or any Drush command: [warning] Drush ...
14
votes
4answers
7k 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?
0
votes
2answers
606 views

Drush not working after install

I just installed drush using "composer require drush/drush". It ran correctly and when it completes a navigate to vendor/drush/drush/ directory where the drush.php file is located Then I run the ...
5
votes
3answers
2k views

“Uncaught ReflectionException: Class DOMDocument does not exist” error

On Ubuntu 16.04, I installed Drush using Composer: composer global require drush/drush:~8. Installation succeeded, but running drush --version, I got this error: PHP Fatal error: Uncaught ...
0
votes
1answer
23 views

Can't access Main menu and can't do drush updb after update

I update Drupal to 8.7.3, but now I can't access my Main menu (admin/structure/menu/manage/main) and can't do drush updb? I have PHP Version 7.2.19 I get this log error: Drupal\Core\Database\...
0
votes
1answer
533 views

Which alias do I use to run it with another PHP version?

The Server available for our new Drupal project uses an old PHP CLI Version by default. But I have setup an alias in .bash_profile like so: alias php7=/path/to/php7 and that is working fine. I would ...
0
votes
0answers
16 views

The drush command 'variable-get' could not be executed

Command variable-get requires Drupal core version 6 or 7 to run. The drush command 'variable-get' could not be executed. drush st Drupal version : 8.7.3 Site URI ...
0
votes
2answers
38 views

Is there a way to run drush updb without going to maintenance mode

I have a live site which runs on drupal 8. I am using drush 8.5.3 with the installation. Whenever I run drush updb the site automatically goes to maintenance mode. Is there a way to do this without ...
0
votes
1answer
480 views

Drush make unable to determine mime type for js

On every .js library that needs to be downloaded, I keep getting errors like: https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js. Unable to determine mime type for jquery-ui.min....
-2
votes
1answer
41 views

Drush won't work after installing drupal 8 on remote server using composer

After installing drupal 8 on a remote server (I have SSH access) using composer I installed drush using the following command: 'composer require drush/drush'. After I type vendor/bin/drush I get the ...
0
votes
0answers
11 views

Ubercart 7x Migration to Commerce 8.x with Drush?

I've been experimenting with upgrading an Ubercart 7.x site to Commerce 8.x and I haven't had much luck so far. The migration process times out when using the migrate UI, so I've tried re-running the ...
2
votes
1answer
521 views

drush perm-grant gives “The drush command 'perm-grant' could not be found”

I am using drush -u 15 perm-grant --roles="site administrator" but the command returns: The drush command 'perm-grant' could not be found. any ideas about that? according this documentation the ...
2
votes
1answer
503 views

Drush rsync permission woes (files directory)

I'm rsyncing just the files directory (rest of the site is done through git) from my local Ubuntu setup to my centOS server. It worked at least (thankfully), but produced a ton of errors. First it ...
1
vote
3answers
545 views

Why doesn't my watchdog() function run when I execute my custom module from Drush

I have a custom module that performs an import from an xml file. It can be invoked two different ways. From a menu callback or a custom drush command. The import works fine and all of it's many ...
0
votes
0answers
30 views

Drush behaves strangely on Windows 10 with Acquia Dev Desktop

After having istalled drush via composer locally I had to make the following changes inside sites\default\settings.php for it to work: Create the database connection array $databases['default']['...
0
votes
0answers
12 views

Drush migration argument for xml source

I asked this question a while back and it was answered correctly and helpfully. However, I'm currently looking for a different solution. I need a way to create a custom argument which I can use to ...
5
votes
2answers
2k views

drush default site alias

Is there a way of specifying a default site alias ? couldnt find it in drushrc example nor aliases example. motivation i am sclerotic and lazy :) usually running drush from the dir where the site is,...
2
votes
1answer
361 views

How to use another php version for drush 9?

On live server I use differents drush and php versions for drupal 8.4 and 7. I install drush 9 to ~/drush9 directory with composer require drush/drush:9.* command. On dev server and drupal 8.4 I use ...
0
votes
1answer
344 views

Drush Hangs on wget but wget Works

Every drush command I run hangs on wget. However, if I run wget outside of drush, it works just fine. I am behind an http proxy and suspect that's factoring into the problem. I don't understand why ...
0
votes
1answer
24 views

How can I create dynamic options based on the existing bundles from hook_drush_command()?

I want to create dynamic options based on the entity types (returned by entity_get_info() function) inside the hook_drush_command(). There's no bootstrapped Drupal available at all, so the db_query() ...
-1
votes
1answer
578 views

Drush 6 installed on a centos server. How do i find out where its installed and upgrade it?

how do i find where is drush installed? its currently on drush 6 and looking to update it to drush 7 for drupal 8. Whats an easy way to find where its installed and update it?
-3
votes
0answers
23 views

Incorrect Drush version being installed when attempting to install site-locally

I am trying to install Drush 8.1.17 site-locally using Drupals own documentation (enter link description here), but every single time I try to install it, 9.2.6 gets installed instead. Globally, it ...
-1
votes
0answers
21 views

Drush bam-destinations was not found

I am attempting to get an existing Drupal project up and running with MAMP, but wouldn't you know it, it doesn't work (like most things Drupal). Basically, I have a fresh instance of Drupal running, ...
0
votes
0answers
12 views

Can I remove warnings/notices from the output of “drush pm:security --fields=name --format=json”?

Running a command similar to drush pm:security --fields=name --format=json gives me what I am looking for. Is there a way to remove warnings and notices from the output? I can't see anything in the ...
0
votes
0answers
17 views

Priority of aliases files for Drush

I have an installation with lando. On the project, we have a directory drush with an aliases file for the project. This file defines aliases with the root specific for the lando architecture. In my ...
1
vote
1answer
716 views

Drush Make: error “unable to unzip”

I'm trying to setup a new project using the Drush make command. I'm working on localhost (xampp) on a Windows 8.1 machine. The problem is that if a module present in my make file requires an external ...
0
votes
1answer
128 views

How do I perform outstanding entity updates after 8.7?

I have just tested the update to 8.7.1 (from 8.6.x) which includes the removal of the old automatic entity update functionality, which means drush entup no longer works. As far as I understand the ...
0
votes
2answers
2k views

Update fails with undefined function system_rebuild_module_data in update.inc but the function is defined in system.module

When I run drush updb on my Drupal 8.3.1 site, I get: PHP Fatal error: Call to undefined function system_rebuild_module_data() in /var/www/mysite/web/core/includes/update.inc on line 46 ...
0
votes
0answers
16 views

Drush not working after updating Acquia dev desktop

So basically I updated my Acquia dev desktop in my MAC and the Drush stopped working throwing some error. I have been trying to fix this issue from past few hours but I couldn't find anything on the ...
0
votes
1answer
24 views

drush handling array variable values

I am using Drupal 7 and drush 7.4.0. How do I handle array variables with drush? For example, I have a variable, social_sharing, for which drush vget social_sharing Produces: facebook: facebook ...
1
vote
1answer
628 views

How to install a drupal distribution using Drush quickstart command?

What is the command for drush qc to install a drupal distribution? I'm trying to install this one: https://drupal.org/project/onepagecv
0
votes
1answer
23 views

Drush not fully installed

I have installed Drush 8.2.3 globally on a Lubuntu 18.04 image. This was done without Composer (I used the default install instructions here) However, if I run drush topic and select any topic number ...
2
votes
2answers
824 views

Loading a queue?

How can I use Drush to pass data into a Drupal Queue? function hook_cron_queue_info() { $queues['my_queue_name'] = array( 'worker callback' => '_my_queue_callback', // This is the callback ...
0
votes
0answers
24 views

Errors while updating core to latest version

I have a website I had worked on but never finished, last year. It is at version 8.5.4. I've imported it (from a devdesktop environment) into a Docker/Docksal environment. At this point I can see a ...
3
votes
1answer
1k views

Why does cloning a private git repository via Drush make file fail using SSH authentication?

I have multiple private git accounts set up with SSH system's keychain authentication for each git repo. It works to clone private git repos from command line: git clone git@git_ssh_alias:git-...
1
vote
0answers
234 views

`drush pm-update drupal` fails to copy to backup

Tried to update some of my Drupal 7 installation with drush. Some of them were successful while some were not. The error ones generate message like this: [foobar@server htdocs]$ drush pm-update ...
0
votes
0answers
44 views

How to change the drush default timeout of 14400?

We face a major problem for our client. To put it in context, this is a Drupal 8 with commerce that has a large number of products that come from a PIM. To be clearer, the products are not managed in ...
9
votes
5answers
9k views

How to list all users in drush?

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 solutions?
1
vote
1answer
416 views

Updating modules fails with XAMPP on Windows 10

I'm pretty sure I installed Drush 8 correctly on Windows 10. I ran the command window as administrator. I changed to my Drupal directory, but I get "Command pm-update needs a higher bootstrap level to ...
-3
votes
1answer
27 views

Running Drupal's drush cron jobs with a newer PHP version from Software Collections

How do you run Drupal's drush cron jobs when your server has a newer PHP version installed from Software Collections? The server is running Scientific Linux 7, which comes with PHP 5.4, but we need, ...
0
votes
1answer
175 views

Running drush entity:updates claimed successful but not changing anything

I am working on a project with custom entity type. My module works fine in my local environment. But when I deployed to my staging site, things are strange. For instance, I tried to change my entity ...
0
votes
1answer
41 views

How can I query a Drupal 7 database from Drupal 8?

I want to query users, nodes etc in my D7 database that I am currently migrating to D8 to compare with the migrated content. I want to use custom Drush commands to run some checks. Is this possible?
0
votes
1answer
54 views

Drush 9 on Windows 7 problem

I installed drush 9 and now I'm getting the following error whenever I run a drush command: /usr/bin/sh: /cygdrive/c/mysite/vendor/drush/drush/drush.launcher: No such file or directory Details: I ...
0
votes
2answers
35 views

Drush error when attempting Drupal update: unable to copy/move [closed]

I have a Drupal site running on localhost (Windows) that I'm trying to update from 8.6.7 to 8.6.15. When using Drush to perform the update (drush up drupal -y), I encounter the following error: ...
2
votes
3answers
2k views

Unable to connect to local MySQL db using drush sql-sync

I'm attempting to use drush sql-sync to sync my prod database to my local dev copy, and everything seems to work until drush attempts to log into the local MySQL. When it does, it throws this error: "...