Questions tagged [drush]
Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).
2,026
questions
-4
votes
0
answers
27
views
Drush says php modes configuration is incompatible with drush
I am trying upgrade a series of old drupal 7 sites but Drush Version : 8.3.2 installed on my shared hosting account says it has trouble with PHP modes. I've reverted the php running all the way ...
0
votes
0
answers
48
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::...
1
vote
1
answer
30
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 ...
1
vote
1
answer
159
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:...
1
vote
0
answers
893
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 ...
2
votes
1
answer
88
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 ...
-3
votes
1
answer
178
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,...
1
vote
0
answers
41
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 ...
0
votes
0
answers
83
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
...
1
vote
0
answers
736
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 ...
2
votes
3
answers
303
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-...
1
vote
1
answer
250
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/...
0
votes
0
answers
92
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 ...
0
votes
1
answer
130
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' =&...
0
votes
0
answers
39
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 ...
0
votes
1
answer
199
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 ...
0
votes
1
answer
112
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 ...
0
votes
0
answers
193
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 ...
-3
votes
2
answers
151
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: ...
1
vote
0
answers
119
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']['...
1
vote
3
answers
407
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 (...
1
vote
2
answers
278
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 &...
0
votes
2
answers
225
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[...
1
vote
0
answers
57
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 ...
3
votes
1
answer
172
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 ...
2
votes
1
answer
312
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?
...
0
votes
0
answers
41
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 ...
1
vote
0
answers
40
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 ...
-3
votes
1
answer
702
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 ...
0
votes
1
answer
469
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 : ...
0
votes
1
answer
43
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=/...
0
votes
1
answer
801
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 ...
0
votes
1
answer
307
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/...
0
votes
0
answers
313
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 ...
0
votes
1
answer
47
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 ...
2
votes
1
answer
249
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 ?
0
votes
1
answer
119
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 ...
2
votes
4
answers
3k
views
I've just installed drush and am getting this error. What to do?
So I've just installed drush 11.2.0 with Drupal 9.4.6 and the first time I executed drush si, I got this error.
PHP Fatal error: Declaration of Drush\Application::setLogger(Psr\Log\LoggerInterface $...
-1
votes
1
answer
254
views
How to install a theme with the command line?
I am trying to install the theme Adaptivetheme.
I have tried this
composer require drupal/adaptivetheme
and then:
vendor/bin/drush theme:enable adaptivetheme
But I got:
Unknown themes: ...
0
votes
1
answer
252
views
How to use Drush remote site aliases with web service or other account?
Developers are not allowed to have direct access to the Production Drupal servers, which are Linux. But, I need for developers to be able to run a limited set of Drush commands via remote site aliases....
0
votes
0
answers
229
views
Import config on Drush install with config in non-standard directory
I've got a site set up with its config sync in a directory outside of web root; specifically ../config/sync (relative to the Drupal root). I have that path set for $settings['config_sync_directory'] ...
-2
votes
1
answer
112
views
drush puts my website in a subdirectory named 'web' [closed]
I use shared web hosting with Cpanel, LAMP and Composer.
I have installed Drupal with Drush on a registered web domain (example.com).
My website is accessible via example.com/web/ but I would expect ...
-4
votes
1
answer
153
views
Access denied in Drush but granted in GUI [closed]
I am trying to install Drupal on a CentOS based shared server environment (namecheap.com) with mysql, ssh and Composer.
I have created a database username and a database with the same name and a ...
7
votes
3
answers
498
views
How can I run the inbuilt Drush 10.x commands as user #1?
I have a Drupal Queue worker class that fetches the Entity objects from Drupal to index to Elasticsearch.
The following command is causing the lesser documents to show up in Elasticsearch since by ...
0
votes
1
answer
882
views
Update the text format and process the body field of existing nodes programmatically
I am trying to resave a number of nodes to apply the text format changes to the body field. I’ve written a drush command to do this. The command does update the text format, but the text in the body ...
2
votes
1
answer
156
views
Why would loading nodes by UUID not work in a drush command?
I have a simple bit of test code to load nodes by UUID:
$uuids = ['5e331255-adf6-423e-a355-dc02c621ffcd'];
$nids = \Drupal::entityTypeManager()->getStorage('node')
->getQuery()
->...
1
vote
1
answer
515
views
Core Update 9.4.1->9.4.2 breaks drush command updatedb (throws PHP Fatal error: Cannot declare class Drupal\mysql\…)
I need help at this mysterious issue:
Core upgrade 9.4.1 -> 9.4.2 breaks drush command updatedb at some installations:
Fatal error: Cannot declare class Drupal\mysql\Driver\Database\mysql\Install\...
-3
votes
1
answer
761
views
How to add local Drush with Composer to a XAMPP Drupal on Windows? [closed]
I have installed Drupal 9 on XAMPP in Windows 11.
How could I add local Drush with Composer to a XAMPP Drupal on Windows?
0
votes
1
answer
498
views
How do I fix the Drush error "SQLSTATE[HY000] [2002] No such file or directory"?
I just updated my macos' php version using homebrew. This worked, the php version I'm currently running is 8.0.2
But doing this my Drush stopped working. When running drush cr I get the following ...
1
vote
3
answers
646
views
How do I install on Windows 11?
I wish to install Drupal 9 on Windows 11 using Drush.
Drupal on the cloud solutions (which should be easily accessible from Windows) cost money and not quite what I seek for a local install.
I can ...