Skip to main content

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
0 answers
63 views

How to update Drush? [closed]

I have installed Drupal 10 using Composer. From Drupal root I run ./vendor/bin/drush --version and I get "Drush Commandline Tool 12.4.3.0". From Drush home page I see that the latest Drush ...
Thomas Seilund's user avatar
0 votes
1 answer
41 views

How do you set up Drush Aliases in DDEV?

We are slowly moving to DDEV for our local development environments and so far so good. I am sure the following is a really common usecase, hence the question. I have tried just about everything but ...
ChumKui's user avatar
  • 183
-3 votes
1 answer
58 views

drush updatedb fails to complete: Bootstrap fails at phase 5, can't find Drush config file

Trying to use drush updatedb after running core updates. Updatedb fails. Code snippet below. EDIT: Project: Website built by 3rd party firm and handed over to my department after the contract to ...
MJX's user avatar
  • 1
1 vote
1 answer
54 views

Using drush PolicyCommands.php

Currently on drush v12.5.2.0 and I am using drush sql:sync to sync my local with the remote db. I want to ensure I do not enter @prod for the target. I realized I could use drush policy to validate [...
juliusfischer's user avatar
-1 votes
2 answers
67 views

Is there a way to know which Drush command is executed from within a hook implementation?

Here is my use case. I'm importing nodes with the classic migration API and goes through some hooks (like hook_node_presave, hook_node_delete...). I also have another drush command that synchronise ...
pbonnefoi's user avatar
  • 1,844
0 votes
1 answer
108 views

Updating my site led to a broken drush, cannot fix

I have run Drupal sites for a long time, and as many of you, have come up with some scripts to aid me. Today, something came out wrongly... and I cannot fix it! In short, my updating script goes over ...
Gunnar Wolf's user avatar
-1 votes
1 answer
90 views

Installing Drush 12 globally

We're trying to install a global Drush 12 installation for a Linux Debian server hosting multiple Drupal 10 websites in different folders. We've tried simply doing a composer require drush/drush in a ...
mlatk's user avatar
  • 11
0 votes
1 answer
37 views

Erroneous .tar.gz created by drush archive:dump. The archive cannot be restored with drush archive:restore

I use Debian 11, PHP 8.1.28, drupal/core-recommended:10.2.6 and drush/drush:12.5.2. When I run drush archive:dump no error is reported. But when I want to restore the archive with drush archive:...
quilx's user avatar
  • 21
1 vote
1 answer
93 views

How do I specify php.ini settings (or a complete file) for Drush?

Before continuing, let me explain that I've tried the methods I've been able to find in documentation. Drush 12.5.2.0 is installed in the project by composer. I've tried adding export DRUSH_INI='/...
WRD's user avatar
  • 319
0 votes
1 answer
63 views

How can I import staged configuration?

I'm trying to import configuration with drush cim. I'm getting Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.xxx.system.site. I ...
Kartagis's user avatar
  • 610
1 vote
0 answers
51 views

How to override PHP attributes in a custom drush command?

I have a custom drush command that is providing table output. Per the docs, since the command will be for Drupal 10+, I'm using PHP attributes. Specifically, there is this attribute: #[CLI\FieldLabels(...
JAyenGreen's user avatar
0 votes
0 answers
56 views

File migration issues

Well - where to start? I'm trying to migrate a medium-sized Drupal 7 site to Drupal 10. I am just going to concentrate on the migrations of files. I'm confused by a few things. One is that I am by ...
Steve Hanson's user avatar
0 votes
0 answers
76 views

Contrib module remove

I want to remove the content_sync module from my site. Firstly I uninstalled it with drush pm-uninstall, run a drush cex, drush cr and then removed it using composer remove. I removed also every ...
user7167081's user avatar
1 vote
0 answers
189 views

How to set environment variables in drush.yml or other config file?

I am using Drush 10.6.2 on a Drupal core version 9.5.11 on AWS EC2 instance, and I'm having trouble getting Drush to bootstrap Drupal if the settings.php database credentials are populated by AWS ...
TripodC's user avatar
  • 41
0 votes
1 answer
24 views

How To Show Version Of Migrate Tool Installed

Is there an Ubuntu (Linux) command line I can use to see current version of the Migrate Tool installed? I don't have access to the front end (admin/modules), just the back-end. I thought maybe some of ...
BigDaddySlat's user avatar
0 votes
2 answers
180 views

Update database issue

In 2 of my 3 Drupal websites, drush updb crashes with the following error after upgrading from Drupal 9.5.11 to Drupal 10.2.2. In BatchStorage.php line 143: [Exception] Serialization of 'Closure' ...
Pierre Ernould's user avatar
-2 votes
1 answer
433 views

Drush Launcher does not work

Drush Launcher gives an error in an environment updated to Drupal 10.2. The environment is Drupal 10.2, PHP 8.2, Drush 12.4, Drush Launcher 0.10.2. Specifically, I get the following error [user@host ...
Skyyade's user avatar
  • 23
0 votes
2 answers
456 views

"Declaration of Monolog\Logger::emergency() must be compatible with Psr\Log\LoggerInterface::emergency()"

I'm using PHP 8.1.2-1ubuntu2.14, Drush 8.4.12 (latest), and Drupal 7.98 (not yet updated). I'm having a problem with a Drush command which uses Google APIs, Google Auth, and Google services. I get the ...
eliosh's user avatar
  • 41
2 votes
2 answers
112 views

How can I have multiple module configs depending on environment?

I have a Drupal site that I build locally and pull to the staging and production servers using git. Normally, my workflow is to run drush cex to export the configs from local, and drush deploy to ...
GeorgeCiesinski's user avatar
2 votes
1 answer
213 views

Drush 12 Installation in Hosting Environments

I'm running a Drupal hosting server, where the client's installation is below the directory /var/www/<client-id> The full path to any of the client's websites is /var/www/<client-id>/...
nofue's user avatar
  • 21
1 vote
1 answer
734 views

I am having a problem implementing a custom command

I am running Drupal 9 on DDEV. I am following detailed docs I have found online for implementing a custom drush command, but having no luck. Here is my drush.services.yml in the root of my custom ...
Dorian Winterfeld's user avatar
1 vote
1 answer
99 views

How to execute a drush command with an answer to a prompt

When I run drush it to sync up my taxonomy content, I am prompted to specify the style: What import style would you like?: [0] Full [1] Safe [2] Force Is there a way I can include my answer to this ...
arnoldbird's user avatar
  • 1,257
0 votes
0 answers
315 views

There were errors validating the config synchronization after changes to modules and config

After many hurdles, struggles, and "learning moments", I pushed my site to staging successfully. Unfortunately, I am running into numerous issues when I try to push updates to a deployed ...
GeorgeCiesinski's user avatar
0 votes
0 answers
79 views

drush uses development.services.yml though not present in settings.php

I am currently observing that drush seems to use development.services.yml from web/sites though development.services.yml is not added via settings.php. Doing drush php:eval "var_export(\Drupal::...
Stefan Korn's user avatar
  • 1,211
1 vote
1 answer
196 views

PDO::MYSQL_ATTR_USE_BUFFERED_QUERY error when using drush

This will be less about a question and more of a way to document things. I had been attempting to use drush (Drush 11 and 12) after installing a new copy of Drupal. It kept throwing Error: Undefined ...
Sherwin Harris's user avatar
2 votes
1 answer
643 views

Command "cim" is not defined

I'm getting the following error while running drush cim on a new environment to import the configurations as they exist in the repo: Command "cim" is not defined also: Command "config:...
DriveItLikeYouStoleIt's user avatar
4 votes
1 answer
3k views

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "The filter image lazy load" plugin does not exist

How can I resolve this issue? This log issue occurs in Drupal 10.0.10, Drush 12.2.0 PHP 8.1 Everything seemed fine when I had upgraded to D10 all the sites were working fine, All of sudden its ...
DevelopmentQueries's user avatar
3 votes
2 answers
164 views

Overriding core Drush command classes

I want to add some info to the Drush status report, drush core:status. Does anyone know a method to do this? I am thinking that if there is an alter service for Drush service info, I can change the ...
Jaypan's user avatar
  • 17.7k
-3 votes
1 answer
459 views

How I can use Drush for portal deployment and redeployment?

I have downloaded Composer on a Windows 11 computer. I have installed Drush with composer require drush/drush, or maybe composer global require drush/drush. As I haven't mentioned any specific version,...
Dev Anand Sadasivam's user avatar
1 vote
0 answers
135 views

"Command theme:uninstall was not found. Pass --root or a @siteAlias in order to run Drupal-specific commands."

When I try to install or uninstall the theme via command, I am presented with the following error message. Command theme:uninstall was not found. Please provide the --root or a @siteAlias to execute ...
Utsav Thakur's user avatar
0 votes
0 answers
171 views

How to run drush cim command for importing all the configurations

I cloned the drupal project on my local. I have a Docker desktop app. so I run docker-compose up -d on command prompt. docker-compose.yml: services: mariadb: image: wodby/mariadb:$MARIADB_TAG ...
Bohdan V.'s user avatar
1 vote
0 answers
2k views

drush in ddev says [preflight] Package "drupal/core" is not installed

Whatever command I run using ddev drush , I am always getting the response " [preflight] Package "drupal/core" is not installed". But drupal is already installed and website is ...
secretsayan's user avatar
2 votes
3 answers
643 views

Fatal error: concerning DrushStyle::warning not being compatible with SymfonyStyle::warning

I just upgraded our site from Drupal 9.5.9 to Drupal 10.1 (following instructions from here - https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-...
Mahesh Gudapakkam's user avatar
2 votes
2 answers
749 views

Drupal root not found on multisite setup after upgrading Drush 10 to 11/12

This is a (25 sites) multisite setup running smoothly on Drupal 9.4 with Drush 10.x still. Upgrading to Drupal 10.1.x and Drush 11 or 12 however makes Drush unusable. Dir layout as installed by drupal/...
tbart's user avatar
  • 41
0 votes
0 answers
261 views

How can you update a single configuration entity using drush?

Every now and then, if I try to import partial configs using drush, like drush config:import --partial --source=stuff/is/here drush seems to understand that some of these config entities exist in the ...
commonpike's user avatar
0 votes
1 answer
402 views

The specified database connection is not defined: default for Drupal drush

I have the following configurations for my Drupal site: sites/mysite/settings.local.php $databases['default']['default'] = array( 'database' => 'mydb', 'username' => 'root', 'password' =&...
Happy Coder's user avatar
0 votes
1 answer
53 views

Config split is imported only every second time of jenkins job run

I have some weird behavior with drush cim when running from a jenkins job. It seems like a config split is only imported every second time or so when the job is run. The update skript containing the ...
macbert's user avatar
  • 363
0 votes
1 answer
382 views

I can't uninstall any module after I uninstalled deprecated modules

I have Drupal 9.5 installed and running. I have uninstalled 3 deprecated modules (Aggregator, Color, and RDF). After that, I can't uninstall any module using the user interface. It gives the following ...
Md. Shafiq Hossain's user avatar
0 votes
1 answer
167 views

Install Drush Launcher on MacOS Ventura on a Apple Silicon (M2) machine [closed]

I know this is not really a Drupal question but rather Drush. Maybe a Mac user can help me. I installed drush launcher under MacOs Ventura on a Mac M2 by following the procedure. Running drush st (for ...
Sébastien Gicquel's user avatar
0 votes
0 answers
290 views

I'm unable to run Drush v8.4.12 on PHP 8.1.6 using Bash on Windows11

I'm on the final two sites to migrate to D9 - but some D9 modules are now needing PHP 8.1 to stay on the latest upgrades. So - I've changed my server environment to use PHP 8.1 - and using XAMPP for ...
Wayne Foster's user avatar
-3 votes
2 answers
235 views

install Drush on shared server

please i need to use drush on shared server i allready use composer foe install drush,, but if i use sudo command sudo mv drush.phar /usr/local/bin/drush , it is give me this massage -bash: sudo: ...
KHALED ALSHEHRI's user avatar
1 vote
0 answers
209 views

"migrate:status" freezes on "Try to validate bootstrap phase 0"

Drupal community! I am working on migrating from D7 to D9. Both are located on separate servers. I configured D7 database as db to migrate in my D9 settings.php, like this: $databases['migrate']['...
Mykyta Miakushka's user avatar
3 votes
3 answers
877 views

Alias listed but cannot be used

I am using Drupal 9.x now and using Drush 10.x. I have always used drush aliases to manage my D7 sites as it makes life so much easier with various environments etc. To test the newer YAML file (...
ChumKui's user avatar
  • 183
1 vote
2 answers
520 views

Hook post update not found

I have a problem with the drush updb command which does not find the hook post updates of my custom module. I noticed that the module install saves the module's name string here in database, table &...
Orane B.'s user avatar
0 votes
2 answers
454 views

Why does Drush crash with "SQLSTATE[HY000] [2002] No such file or directory"?

I have an error when i try to update my db or install a module with drush. [info] Try to validate bootstrap phase 5 [0.11 sec, 10.08 MB] [info] Unable to connect to database with message: SQLSTATE[...
Z3RaK's user avatar
  • 1
1 vote
0 answers
65 views

fclose only creates file at script end when running drush command [closed]

I'm really struggling with Drupal php memory/file/cache management. I've tried a lot of different ways to avoid memory errors (php 8.1) when writing a multi-megabyte file out. My observation is even ...
Scott's user avatar
  • 41
4 votes
1 answer
347 views

How to get the current running Drush command?

I would like to detect from code the current running drush command. I have some hooks that will be run when I exec some drush commands and want to detect which command is triggering the hook. I manage ...
Notd's user avatar
  • 53
2 votes
1 answer
495 views

How can I check with if my site is running?

Is there a way with Drush or something else to check if a specified Drupal site is still up and running, means fully normal functioning, after automated maintenance/updating in an external script? ...
gzwg's user avatar
  • 25
0 votes
0 answers
42 views

PHP Error: Drush\Application::setLogger(Psr\Log\LoggerInterface $logger) must be compatible in two given files | How to fix this error? [duplicate]

I was trying to setup a local environment of a website created on Acquia cloud platform. Everything was done properly including the database import. But now, when I execute drush commands, it gives me ...
techenzie's user avatar
1 vote
0 answers
58 views

Migrate Medias update : entity_lookup process error

I'm trying to update Medias already existing in my Drupal using Migrate and the process entity_lookup. The field field_uuid was designed specifically as a matcher for my .json original datas and the ...
CanardPpc's user avatar

1
2 3 4 5
41