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
3
votes
1answer
84 views

Status page shows "Mismatched Entity.." for a Paragraph field but Drush entup give error "..storage cannot change the schema for an existing field"

I'm stuck in a loop. The Drupal 9.3 status page shows the following error: Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. ...
0
votes
1answer
30 views

Why do some Drush commands only run from docroot?

Wondering if anyone knows why some Drush commands (with file parameters) only run from the docroot and won't run from the project/composer root? Commands such as drush sql-query and drush locale-...
1
vote
1answer
36 views

Error: Call to undefined function drush_shift()

We recently moved to Drupal 9.3.0 with a composer file layout and Drush 11.0. We make use of Drush Scripts to execute website functions from Crontab. One specific case is sending a newsletter email ...
1
vote
2answers
448 views

Drush dl not working on Ubuntu with postgresql backend

modules can be added manually, but drush dl or drush en produce errors and will not download a module database section from settings.php $databases['default']['default'] = array( 'driver' => '...
0
votes
2answers
1k views

Drush failing to load drush.php file

I have Drupal 8 project on my local machine, which is set up with composer and I got drush included. When I'm in project root I can call drush like: vendor/bin/drush -v And that work well (...
0
votes
0answers
23 views

How to prevent drush migrate:import from updating existing content?

Drush migrate:import (version 10.3.6) seems to be updating existing content regardless if the --update option is used or not. What could be the problem? I've tested it both with and without the --...
-1
votes
0answers
19 views

Deprecated drush methods [closed]

drush_get_option('force-rebuild', FALSE); The code above is deprecated, any workable suggestions will be appreciated.
1
vote
1answer
640 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 ...
1
vote
1answer
583 views

The database is not bootstrapped in another docker container

The following problem occurs when running certain Drush commands, such as drush en features which outputs: Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush ...
-2
votes
0answers
16 views

Issues TypeError: Return value of Drush\Drush::drushReadDrushInfo() must be of the type array

Problem/Motivation After moving the website from local to a shared hosting, I can't view the /admin/modules "Extend" GUI Content of drush.info inside vendor/drush/drush/: drush_version=10.6....
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: "...
1
vote
2answers
249 views

Custom Drush command and Settigns::get(), Config::get()

how can I access site configuration when in Drush command? Global variable $config === null and when I use Config::get('key'), I get Error: Using $this when not in object context in Drupal\Core\...
3
votes
2answers
2k views

Drush bootstrap level error

Im running onto some issues with Drush. I worked with php 5.3 and after upgrading to 5.5, i ran into some issues and decided to downgrade my PHP version back to 5.3. Now im running into the issue that ...
0
votes
1answer
470 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 ...
1
vote
1answer
4k views

Drush DB connection on MAMP

I have a slight issue in connecting Drush to my MAMP localhost DB. Already tried multiple solutions like changing host from localhost to 127.0.0.1, and editing MAMP files like this suggestion. It ...
0
votes
1answer
778 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 ...
0
votes
1answer
349 views

drush cannot update commerce kickstart

I just installed Commerce Kickstart and got a prompt to upgrade from 7.x-2.20 to 7.x-2.21. drush cannot update throws error: The commerce_kickstart directory could not be found within the modules ...
0
votes
2answers
425 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 $...
4
votes
1answer
379 views

Migration of content with an UI

My goal is to import data of customers from a csv file to my custom entity. For that I wrote a migration with the migrate_source_csv module as source plugin. This works fine, but the problem is, that ...
0
votes
1answer
349 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 ...
0
votes
1answer
384 views

Error when uploading file through Drush on S3 volume

I am using Amazon S3 volume to store the node's attachment. I keep having the following message: file_put_contents(public:///.htaccess): failed to open stream: "DrupalPublicStreamWrapper::stream_open"...
2
votes
1answer
386 views

How to use drush site-lists alias?

I several folders containing symlinks to my drupal sites. I'd like to use this folder structure to create an alias so I can run commands on each group of sites. I'm trying to do what "drush @sites ...
1
vote
2answers
5k views

Bootstrap failed

I have Drupal 8.8.1 and Drush 10.1.1, both installed with Composer. I'm running the following to update my site DB: $ drush updb In BootstrapHook.php line 32: Bootstrap failed. Run your command ...
1
vote
0answers
23 views

Problems in collations when restoring

I'm quite lost with this issue I'm experiencing, so any clue will be appreciated. Let's start with the "symptoms". Whenever I restore a Drupal 7 site that has been previously backed up with ...
0
votes
1answer
2k views

"PHP Fatal error: Call to undefined method Consolidation\AnnotatedCommand\Hooks\HookManager::getHookOptions()"

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 ...
7
votes
1answer
5k views

Why drush "assume yes" -y option do not work for some commands

Drush has global option -y (or --yes) which allow you not to type y on every promt during given command execution. (There is also -n or --no option to which following applies as well.) This works ...
2
votes
1answer
53 views

How do I run the drush tests in docker?

I'm trying to improve drush, and the drush contributing guidelines state: Drush's own tests may be run within provided Docker containers (see docker-compose.yml): Start containers: docker-compose up -...
8
votes
4answers
4k views

How to delete a node or a list of nodes with Drush?

I discovered the Delete all module which gives you the ability to delete all the nodes of a given content type. However, with this module you can't delete a single node or a list of nodes. In the ...
2
votes
1answer
762 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" ...
1
vote
2answers
1k views

The missing modules don't get installed after updating with Composer

To update a site locally, I cloned the code base with git to my local computer and imported the database, then ran "composer update --with-dependencies", there were no errors, then I went to /web ...
0
votes
1answer
488 views

Run a drush script from php system()

I have a Drupal module with a function that runs a system(“myscript.drush”); function _deploy_monitor_stream($submission_id) { header("Content-type: text/plain"); disable_ob(); // Outputs to ...
2
votes
1answer
1k views

TypeError on "drush config-export"

I've been receiving the following error message when trying to do a drush config-export command. However, I am able to successfully do the configuration export from the Drupal admin page (admin/config/...
0
votes
1answer
1k views

Drush command terminated abnormally

I'm using https://github.com/drupal-composer/drupal-project and get an error when starting drush: [~/public_html/drupal]# alias drush="~/.composer/vendor/bin/drush" [~/public_html/drupal]# drush [...
-1
votes
1answer
4k 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 ...
0
votes
1answer
440 views

Unknown engine type outputformat

Hello I've just updated Drupal (to version 7.53) and now in Drush when I try launch the commands: "drush @theflyingeye.org up" (to update my website) or "drush @theflyingeye.org cc" (to clean chache) ...
1
vote
2answers
382 views

drush migrate:status comes back with SQLSTATE [hy000] [2002] No such file or directory

Using drush on my macOS. Using Nginx and MYSQL through brew. Website is running fine. The other drush commands work fine, drush cr, drush cc, etc. But running drush migrate:status or drush ms results ...
13
votes
6answers
44k views

Drush command not found after Drush completely installed

I installed Drush 8 with composer. composer require drush/drush:~8 Unfortunately, error drush command not found after Drush completely installed. Why's the drush command can't be use? Installing ...
0
votes
1answer
3k views

Is it possible to update/remove/install 1 package with composer without updating everything?

I have seen a few posts answering this and saying that "composer require package" or "composer update package" will do this; but absolutely everything i do with composer attempts to update everything ...
0
votes
1answer
364 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 ...
1
vote
0answers
60 views

Migration executes from drush but not from UI

I have a list of migrations (custom ones but following the guidelines). The migrations have no problems being executed from console with drush mim but if I try to execute them from the migrations UI I ...
1
vote
0answers
85 views

Drupal Commerce 2 updating with composer

I am a retired civil servant -- NOT a developer by a long shot -- and while I have used Drupal for about 19 years, I am new to composer and drush and Drupal Commerce 2. I was able to successfully ...
2
votes
1answer
36 views

How do I switch user account in drush to test permissions?

I'm playing around with the D9 Groups module and I want to test the access control in drush, either using drush php or writing a script and using drush scr. In drush 8 I would always use drush -u to ...
3
votes
2answers
1k views

How do I check if a module is being used by another?

I'm using a multi-site setup with Drupal 7.14 core, and I want to disable some modules within my sites/all/modules shared folder. One of them in particular is the File_Entity module. Is there a way (...
0
votes
1answer
56 views

Is it possible to use WSL-based Drush on a Windows 10 XAMPP and if so how?

I currently use Drupal 9 but concepts about Drupal 10 may be useful. I use Windows 10 Home with XAMPP and C:/xampp/htdocs is my web application root. I want to establish a minimal Drupal development ...
0
votes
1answer
2k views

How to fix drush issue "Could not bootstrap at phase 5"?

I installed drush via Composer. I am using drush 9.5.2 with Drupal 8.6.4. I mention that everything is fine on local. However, in a docker instance in GitLab CI, when I execute vendor/bin/drush ...
2
votes
0answers
35 views

drush cr on replicated servers

I am the administrator of a Drupal site replicated on 4 servers, behind a load balancer. There is only one database that is shared by the 4 instances. When I run drush cr, is it necessary to run it on ...
0
votes
1answer
382 views

Drush not connecting to site's settings.php

When I run drush --debug status in the docroot of my Drupal site, I get the following message: [user@computer]$ drush --debug status Phar detected. Proceeding to drush_main(). Loading drushrc "/home/...
10
votes
5answers
6k views

How to pass argument to php file using a drush command?

I've small php script in my public folder called sample.php. I run this file using drush command drush scr sample.php. I want to know how to pass argument to php file using drush command and how to ...
2
votes
6answers
7k views

How do I resolve this installation error?

I am getting the following error while installing Drush with composer require drush/drush. Using version ^8.1 for drush/drush ./composer.json has been updated Loading composer repositories with ...
2
votes
1answer
518 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 ...

1
2 3 4 5
40