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
13 views

How do I move my site from development to production?

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/ -...
2 votes
2 answers
705 views

Weekly check of the admin/performance/status report pages [closed]

We run around 100 Drupal sites. I want to automate a weekly check that will scan all of the admin/performance/status report pages. I had a look at drush status but it doesn't give me the same ...
0 votes
2 answers
1k 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
4 answers
2k 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 ...
1 vote
1 answer
699 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
2 answers
3k views

Is it currently possible to install Drush locally on a Windows 10 PC?

Is it possible to install & use Drush locally on a Windows 10 Notebook to manage Drupal sites (on shared hosting) online? I have so far searched in vain, may be in wrong places. The places I see ...
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 ...
3 votes
1 answer
6k views

"Drupal root not found. Pass --root or a @siteAlias in order to see Drupal-specific commands"

I have multiple sites inside the same htdocs directory. In one, I removed all the folders except vendor under Web. Now drush will not work (it worked before I moved the folders). But now, it cannot ...
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 ...
1 vote
1 answer
428 views

Drush not selecting database

I'm using a Vagrant environment generated from https://puphpet.com/ for a Drupal project & it is all going well except for Drush which gives me an error any time I try running "drush cc -all", see ...
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 ...
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' ...
10 votes
4 answers
4k views

Drush command to check if Drupal is installed?

Is there any way to use Drush to determine if Drupal is installed, and have it return true or false? The boolean output would be used elsewhere in a bash script's logic. Bonus: it needs to work for ...
5 votes
2 answers
421 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 ...
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/...
0 votes
1 answer
882 views

How to stop cron process without rebooting my server?

I have tried the following: drush php-eval "\Drupal::lock()->release('cron');" This had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log. I ...
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 ...
2 votes
2 answers
2k 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/...
-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 ...
-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 ...
3 votes
1 answer
1k views

Why does cloning a private git repository via Drush make file fail using SSH authentication?

I have multiple private git accounts set up with SSH system's keychain authentication for each git repo. It works to clone private git repos from command line: git clone git@git_ssh_alias:git-...
1 vote
2 answers
481 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' => '...
2 votes
2 answers
1k views

Loading a queue?

How can I use Drush to pass data into a Drupal Queue? function hook_cron_queue_info() { $queues['my_queue_name'] = array( 'worker callback' => '_my_queue_callback', // This is the callback ...
2 votes
1 answer
925 views

cannot use some drush commands

I am running into some trouble with drush pm-enable: I cannot enable the modules I just downloaded. I did some research but none of the solution worked for me, most cases involved switching localhost ...
3 votes
1 answer
6k views

Drush database issue

I have encountered an issue with Drush, which doesn't show many commands that should be present. When I run a command with the --debug flag, I see the following error message. [Symfony\Component\...
0 votes
1 answer
423 views

Getting Drush to play with MAMP and Acquia

I have a Mac workstation which is shared between two users, User°1 who first installed the machine, and User°2 who came along after, both administrators. User°2 has installed Drush using brew and ...
0 votes
1 answer
490 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
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 ...
0 votes
1 answer
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 ...
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 ...
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-...
1 vote
2 answers
471 views

Update command won't work for multisites

I have a Drupal 7 site with a half-dozen multisites/subsites and I am trying to setup Drush so that I can run my modules updates from the command line for the subsites. Running Drush for the main site ...
1 vote
1 answer
854 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 ...
1 vote
1 answer
423 views

"drush config-split:export" returns "Not enough arguments (missing: 'split')."

I recently upgraded from Drupal 8 to Drupal 9. I've used drush config-split:export (drush csex) quite often. After the upgrade, it keeps throwing an error which is very vague. Not enough arguments (...
3 votes
2 answers
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
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 ...
2 votes
3 answers
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: "...
0 votes
1 answer
549 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 ...
9 votes
4 answers
10k views

How can I execute Drush commands programmatically?

I'm working on a Drupal 8 site, and part of the requirement is giving the client a page where they can click a button to do a particular task. I am able to do this using a Drush command from the ...
0 votes
1 answer
451 views

Use drush to install a module on all of the sites of a multisite at once

I have a Drupal 8 multisite, setup with 6 different sites. I want to install Admin Toolbar on all of them on my local dev environment (mamp / terminal / drush). I have downloaded that module using ...
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 ...
1 vote
1 answer
711 views

Disabling backups after "drush up"

I use drush up for sites on a shared server and development sites. Within some months, my inode volume went from about 25% to 96%. Given I have already 30 days backwards of backup service, I don't ...
2 votes
1 answer
455 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 ...
0 votes
1 answer
432 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"...
0 votes
0 answers
337 views

Using drush config import and update db in a rolling deployment (k8s) environment

Disclaimer: complete Drupal newbie here. I'm the infrastructure guy in the team. We are running various Drupal 8.9 instances on Kubernetes using a managed MariaDB outside k8s. We build Docker ...
0 votes
1 answer
381 views

Drush 10 is not working - seems unable to properly find the site

Greetings to all of you. Drush seems unable to properly find the site. The output of vendor/drush/drush/drush status PHP binary : /usr/bin/php PHP ...
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>/...
0 votes
1 answer
456 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) ...
0 votes
1 answer
587 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 ...
15 votes
4 answers
12k views

How to replace "default" with website domain name during drush user-login

When I run drush user-login username, drush prints a url like http://default/user/reset/1/32323933.... How do I replace default with the actual website name?

1
2 3 4 5
41