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
1
vote
1answer
81 views

Updating without Composer

I've previously used Drush to update my Drupal-installations. They are installed without using Composer, and currently on version 8.7.3. However, when I try to use Drush (drush v8.1.15, using drush up)...
1
vote
1answer
23 views

Is there a way to list permissions for a given module?

Using Drush 9, I am trying to automate the creation of a role and I need to assign permissions to it. I see that I can use drush role-add-perm to do the assignment itself, but I can't find a command ...
0
votes
0answers
15 views

Drush migrate can't find database

I am running a local Drupal 8 site via Aquia DevDesktop. I enabled the Migrate modules: Migrate, Migrate Drupal, Migrate Drupal IU, Migrate Plus and Migrate Tools. When I run a migrate command in ...
2
votes
2answers
61 views

How can I exclude some entities in “drush entity:delete” command?

I want to delete all content of custom entity type except some specific items, I found drush entity:delete CUSTOM_TYPE command to delete all contents but couldn't exclude some items from deletion in ...
0
votes
0answers
17 views

D7 to D8 site migration and location of migration log

I'm using drush to migrate a D7 site to D8. I'm getting several errors in the drush migrate-import --all step. D8 site is installed using a bash script that executes: drush site-install standard -...
0
votes
0answers
62 views

How do I uninstall Drush 9 and install Drush 8?

I take it I can't manage Drupal 7 sites with drush 9 so I'm trying to install Drush 8. But first I have to remove 9. I tried composer global remove drush/drush but it gives errors: drush is not ...
2
votes
1answer
41 views

Xdebug not working over Drush

I'm using Drupal VM and the Drush Launcher (0.6.0). Whenever I try to Xdebug, PhpStorm notices, but it never actually reaches my Drush command. It stops at running Drush. This seems to have started ...
0
votes
0answers
41 views

Drush 9.x fatal error when running drush status (or any other drush command) [duplicate]

I'm running Drupal 7.67 on a Debian machine with PHP 7.2 and MySQL 5.6. My drupal installation is working perfectly fine with no warnings to find under /admin/reports/status. I've installed Drush 9.x ...
1
vote
2answers
64 views

Deployment using Composer replacing old style install but issues with legacy Drush

I took a Drupal project that was created awhile back via downloading a tar file and recreated it on a local via composer with drupal-project. The recommended files were committed to git (i.e. no ...
-1
votes
1answer
21 views

User password reset link leads to access denied page

Command: drush uli Output: http://default/user/reset/uid/..../...hash.../login The output URL normally logs you in automatically, but it gets takes to access denied error instead.
0
votes
1answer
41 views

Drush cannot find your database connection details

I try to install open social using drush-8.3.0 and drupal-8.7.5. The first step is to run composer create-project goalgorilla/social_template:dev-master public_html/peer/opensocial --no-interaction. ...
0
votes
0answers
19 views

Drush isn't connecting to my database

I have a Drupal install on a CentOS development server. Running drush from outside my web directory returns as you'd expect (a list of Drush commands). Running drush from inside my web directory ...
0
votes
1answer
32 views

Drush custom command not found in context of running --root option

Drush 8. Have the custom module with the custom command. Call drush custom-command works as expected. Call drush --root=sites/subsite custom-command thiggers the error: The drush command 'custom-...
-1
votes
1answer
28 views

Patch Status for 'cweagans/composer-patches'?

It seems that 'Drush Patch File' (https://bitbucket.org/davereid/drush-patchfile/src/master/) isn't compatible with Drush 9. It, however, has one important function - Patch Status - which enables ...
0
votes
0answers
20 views

Make Drush 9 @self path include full site

I've just upgraded to Drush 9 and I'm the root path for @self is only the web-folder and therefore not the full drupal site. That behaviour isn't intended, right? The result is that changes within the ...
2
votes
1answer
98 views

Using Drush without local copy of Drupal, only calling site aliases - No site aliases found

We have a project which does not contain a Drupal codebase. It's Cypress.io test with Drush 9 added using Composer. I would like to execute Drush with site alias to work with the remote site while ...
0
votes
0answers
17 views

How can I create a user with a term reference field in a Behat test when using the Drush Driver

My Behat test has the following Given statement. (field_regions is a taxonomy reference field) Given users: | name | mail | roles | field_regions | | Joe User | joe@...
0
votes
3answers
73 views

Error during config export

I have added one field in the content type. So when trying to export configuration it gives an error $ pwd $ /c/xampp/htdocs/Test/docroot/sites/testone.com $ ../../../vendor/bin/drush config:export -...
0
votes
1answer
31 views

Drush can not connect to mysql when run a Drupal in a Docker/Azure

I have a website that it's running ok in Docker/Azure. I have this configuration in my settings.php $databases ['default'] ['default'] = array ( 'database' => getenv ( 'MYSQL_DATABASE' ), ...
0
votes
0answers
27 views

How to configure Settings.php so drush can connect to Aquia Devdesktop database [duplicate]

I have locally installed the latest Drupal 8 codebase via composer with this project: https://github.com/drupal-composer/drupal-project which comes with the latest version of Drush as well as Drupal ...
0
votes
0answers
56 views

What does “The Language field needs to be updated.” mean?

It may be a stupid question, but I don't quite understand how to go around drush entity-updates from Drupal Version 8.7 on. For example on /admin/reports/status, it says: Textbox The ...
-2
votes
1answer
32 views

Drush command for setting up databases

I just installed Drush 9 on my ubuntu 19 machine. I also downloaded the latest Drupal 7 and 8 to my /var/www/html folder. My mysql is verified working. Is there a quick drush command to help me setup ...
0
votes
1answer
86 views

Recommended Drush version to use and install for Ubuntu 19 with PHP 7.2 and running Drupal 7

It's been awhile since I've upgraded my server and I'm setting it up from scratch. I'm using Ubuntu 19, apache 2 and PHP 7.2. My site is Drupal 7 which is still running php 5.6 in my old server. I'm ...
0
votes
1answer
73 views

Can Drush 9 be used with this core version?

I have a Drupal 7 site that was not built with Composer. I have been using Drush 7 with it, but about a week ago, drush wd-show --tail stopped working, I'm not getting any output. I installed Drush 9, ...
4
votes
1answer
140 views

How to disable creation of node revisions on programmatic node update?

I added a field of type computed field to existing nodes. It's required to re-save the nodes to set/update computed field values. As I do not want to update the changed timestamp I decided to not use ...
0
votes
1answer
179 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 ...
0
votes
0answers
20 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
72 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
0answers
17 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
61 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
39 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
13 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 ...
0
votes
0answers
13 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
2answers
795 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
0answers
18 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 ...
0
votes
0answers
26 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
35 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 ...
0
votes
0answers
31 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 ...
0
votes
1answer
28 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() ...
-3
votes
1answer
50 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
0answers
88 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 ...
1
vote
1answer
705 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
55 views

How can I query a database created using the previous core version from the new core version?

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
75 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
46 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
1answer
30 views

How to replace drush_download_file in Drush 9

drush_download_file() existed in includes/drush.inc for Drush 8 and below, but this has been removed in Drush 9 as far as I can tell. Is there a standard way that file downloads should be executed in ...
1
vote
1answer
77 views

No such file or directory in Drupal\Component\DependencyInjection\PhpArrayContainer->createService()

I installed a fresh D8 (Drupal 8.6.15) site on my local dev and I am unable to use drush. After I installed the site, I also did a composer install. My dev is set up on php 7.1 using AMMPS and drush ...
0
votes
1answer
90 views

Drush: How do I change the Drupal root

My Drush commands doesn't work because my Drupal files are in another directory than the one set in Drush. Everything is set up to this path so I can't just change the folder name. Drush status [..]...
0
votes
1answer
192 views

Drush command to run cron won't work in Crontab

I am attempting to run two Drush commands from my crontab: # m h dom mon dow command */2 * * * * drush -r /path -l https://www.domain.com/ cron */2 * * * * drush -r /path -l https://www.domain.com/...
-2
votes
1answer
86 views

How does `drush cim` find and handle the config-directory? [closed]

I would like to know where the config directory is, and how drush cim command exactly handles it? Edit: The old title (i.e. "Where is Drush's command-specific documentation?") was because I thought ...