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
2
votes
1answer
59 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
1answer
370 views

Can't use drush site-install to drop tables and reinstall in MAMP

I have a local multisite instance running MAMP 3.0.7.3, and I can't use the drush site-install command to do a re-install of one of my sites without actually dropping the database first. If I try the ...
0
votes
1answer
82 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, ...
0
votes
0answers
48 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
1answer
226 views

How to use Drush with Apache Directives?

My Drupal installs are set up with apache environment variables/directives (SetEnv DB_NAME somedb) to store the database name, username and password. It appears that Drush isn't able to use these by ...
3
votes
2answers
152 views

Load Aegir's site credentials from a php function

I'm using Aegir and want to inject some data into a site's vhost. And I managed to do it thanks to this post. My problem is I can't find an Aegir function to load a site's dabase configurations from ...
4
votes
2answers
576 views

Custom redirects and Drush/updates

I usually update Core with Drush, because it's so easy and wonderful, but I have a custom htaccess and it always overwrites it, forcing me to rely on a checklist where I have to go and put my custom ...
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 ...
2
votes
1answer
505 views

cannot use some drush commands

I am running into some trouble with drush I can't pm-enable the modules I just downloaded with it. I did some research but none of the solution worked for me, most cases involved switching "localhost" ...
3
votes
1answer
486 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. ...
0
votes
2answers
403 views

Translate untranslated strings

I downloaded and enabled translations for my Drupal core and modules using these Drush commands: drush dl l10n_update && drush en -y $_ drush language-add lt && drush language-enable $...
-1
votes
1answer
26 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.
2
votes
1answer
108 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
1answer
76 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
36 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
52 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-...
0
votes
1answer
353 views

How to configure drush with Acquia DevDesktop on Windows to access through proxy?

There are some answers to similar questions using WAMP, but now drush is not recommended under Windows (unless using DevDesktop, which I am). And this is seriously frustrating. I followed the ...
2
votes
1answer
152 views

Set site URI for drush uli without 'default'

Versions discussed: Drupal 8.6.13, Drush 9.6.1. This is somewhat similar to How to have an environment specific drush.yml? except that the other thread is now four or five months out-of-date and ...
-2
votes
1answer
152 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 ...
0
votes
1answer
58 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
155 views

sql:sync not working

I'm using drush 9 on a remote server and I'm trying to perform a sql:sync. This is my alias: live: host: www.mysite.com paths: drush-script: '/home/wodby/drush-wrapper.sh' files: files ...
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://...
4
votes
2answers
3k 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 ...
2
votes
2answers
4k views

Boostrap failing with Drush 9.1.0

I had Drush 9 working before it got upgraded to 9.1.0 and am a little bit at my wits end why Bootstrap is failing and why I get "Bootstrap failed" or "! [NOTE] Drupal root not found. Pass --root or a @...
6
votes
4answers
5k 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 ...
1
vote
1answer
658 views

Drush not working on a docker based enviroment on ubuntu 16.04 [closed]

I have set up a local dev docker environment with the Drupal social distribution. My issue is that Drush commands do not work and whenever I run a Drush command, it takes approximately 45 seconds to ...
0
votes
0answers
30 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@...
14
votes
2answers
7k views

What is the purpose of drush entity-updates?

After updating Drupal 8 modules, I have been warned on the Drupal 8 status page that: Entity/field definitions: The following changes were detected in the entity type and field definitions. ...
0
votes
1answer
1k views

Drush installed in local directory but command not found?

I know that Drush is a huge time saver so I'm trying to get familiar with it but I keep getting command not found error after installation. I've required and removed Drush a couple of times just ...
0
votes
1answer
37 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' ), ...
1
vote
0answers
321 views

Why Are we getting “WD view: View name 'XXX' is already taken” when running Drush; and how can it be fixed?

We are getting the following output whenever we run the drush script. This is problematic in logs when the drush cron is run. What is causing this and how do we fix it? This started showing up ...
2
votes
1answer
520 views

Drush alias doesn't work

None of my site aliases defined in /home/peter/.drush/aliases.drushrc.php seems to work. When I ran: drush sa @mysite.dk.local I got $aliases['mysite.dk.local'] = array ( 'uri' => 'mysite.dk', ...
2
votes
1answer
4k views

How to solve “Query failed” error in drush sql-sync output?

This is a follow-on to my earlier question on this site. I hope posting it as a new question is appropriate. I'm trying to clone an existing drupal installation into a place on my mac with the ...
1
vote
1answer
1k views

How to apply patches on Pantheon?

This is specifically a question about Pantheon best-practice workflow, which I'm new to. I run from a Win7 machine and do not have a full dev environment set up locally: it's just too much hassle to ...
1
vote
1answer
280 views

Drush 9 pulling incorrect site information on Multi-site

We have a multisite set up with Drupal 8.6.1 and Drush 9.4.0. This is set up on two servers that were set up identically. The issue we are running into is that Drush is only detecting defaultsite, ...
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 ...
5
votes
4answers
2k views

Unable to load class \Drush\VersionControl\Backup

I keep getting this error : Unable to load class \Drush\VersionControl\Backup every time i attempt to update my Drupal install from 8.4.0 to 8.4.2. I am running the composer provided drush Drush ...
0
votes
0answers
75 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 ...
0
votes
1answer
125 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 ...
-2
votes
1answer
33 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 ...
1
vote
2answers
446 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, ...
12
votes
4answers
3k views

How can I get a list of content types with drush?

How can I get the existing content type list with drush? This will allow me to quickly produce a list. I've tried with: $ drush @d6 @sites genc --types But I need the devel_generates module ...
4
votes
1answer
202 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 ...
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
314 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 ...
15
votes
3answers
8k 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?
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
0answers
27 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
165 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 ...