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
0 votes
0 answers
15 views

How do I move my site from development to production? [closed]

Recently, I setup a local Drupal 10 site using ddev and now I want to move it to production (a cPanel server). How would I do that? My local setup is like this vendor/ web/ -core/ -sites/ -...
joe's user avatar
  • 13
0 votes
0 answers
20 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
58 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
0 votes
0 answers
109 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
  • 21
0 votes
1 answer
21 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
1 answer
106 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
-1 votes
1 answer
145 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
-3 votes
0 answers
73 views

How to upgrade both Drupal and Drush at once? [duplicate]

To do a minor upgrade for a Drupal project I do composer update but I have learned that this global command will not upgrade Drush. If Drush is an add-on over a Drupal project, why then this global ...
just someone in the void's user avatar
0 votes
2 answers
121 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
  • 31
2 votes
2 answers
74 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
159 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
232 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
53 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,173
0 votes
0 answers
61 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
53 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,212
1 vote
1 answer
60 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
300 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
2 votes
1 answer
2k 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
2 votes
1 answer
113 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.4k
-3 votes
1 answer
294 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
96 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
124 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
1k 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
468 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
1 vote
2 answers
483 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
  • 31
0 votes
0 answers
149 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
240 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
0 answers
43 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
321 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
125 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
236 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
183 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
154 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
659 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
  • 169
1 vote
2 answers
393 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
305 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[...
Ionut Gabriel's user avatar
1 vote
0 answers
61 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
  • 31
3 votes
1 answer
241 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
  • 43
2 votes
1 answer
385 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
45 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
-3 votes
1 answer
815 views

Best practice to upgrade drupal 9.4 to 9.5? Composer or Drush method? [closed]

I can run this command to upgrade drupal 9.4 to 9.5, but I can also do it in drush. Which method is better and why? composer require drupal/core-recommended:9.5.0 drupal/core-composer-scaffold:9.5.0 ...
Patoshi パトシ's user avatar
0 votes
1 answer
625 views

Drush commands not defined - drush 11.4.0 drupal 9.5.1

This configuration is working properly on xampp local install (drush version) Drupal version : 9.5.1 DB driver : mysql DB hostname : localhost DB port : 3306 Database : ...
duck's user avatar
  • 29
0 votes
1 answer
44 views

Why fails the comparsion between two identical version numbers in this script?

I try to compare in a Script two different version numbers of Drupal via drush status. The result should be printed out in a if-else. I made a minimal example: # put paths in vars WEBSITE_ROOT_LIVE=/...
gzwg's user avatar
  • 25
0 votes
1 answer
1k views

Drush fatal error with Declaration of Drupal\Core\Logger\LoggerChannel::log [closed]

When I run any drush command or even just drush I get the fatal error: Fatal error: Declaration of Drupal\Core\Logger\LoggerChannel::log($level, $message, array $context = []) must be compatible with ...
AlxVallejo's user avatar
0 votes
1 answer
376 views

Database update doesn't work after update from 9.2 to 9.3

I have unfortunately not found anything that seems to solve my issue. My Google-fu may be defunct. I have upgraded a Drupal site from 9.2 to 9.3. This works as expected with composer (I use drupal/...
Angus's user avatar
  • 51
1 vote
0 answers
359 views

How to change TIMEOUT for Drush command

I am working on a website with an extremely heavy database. As a result, the command drush sql-cli < [db_filename] takes more than default value of 14400 seconds. I need to find a way how to change ...
Sergey's user avatar
  • 61
0 votes
1 answer
48 views

How to run drush using locally modified repo (from github fork)

I have my own drush repo forked from https://github.com/drush-ops/drush and have a local clone of this, as I want to start modifying and potentially push back to add a new function. How do I configure ...
Jonathan1055's user avatar
2 votes
1 answer
305 views

Testing Drush Commands

How to test custom implemented Drush Commands ? Are there any Open Source Examples for Drush Commands with Unit Tests or something like that ?
Bernhard Zürn's user avatar
0 votes
1 answer
136 views

Without site aliases, "drush sql:sync" fails

I run into an issue that the use of an alias returns correct values, but without alias or from remote, I miss the DB connection. Furthermore, the root directory is wrong. The missing DB connection ...
Micha's user avatar
  • 1

1
2 3 4 5
41