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
2answers
508 views

Run a drush command via module

Is there a way to run a Drush command using a module? I tried exec("drush ..."); but I have found out it is not recommended. Is there any other command I could use?
0
votes
1answer
52 views

Using Drush on shared hosting without `curl` and `wget`

I have a Drupal 7 site installed on shared hosting. And installed Drush:8.1.17 with composer and cgr all is working well except drush up because hosting provider does not support curl or wget on ...
0
votes
1answer
41 views

Double slash in path of downloaded module

I get a strange behaviour on 2 websites under Drupal 8. When I download a module via Drush, the path contain two consecutive slashes like this. Project key_value (8.x-1.1) downloaded to /home/www/...
2
votes
3answers
508 views

Drush on production server without Composer

I want Drush 9 on a Drupal 8 production server without having to install Composer. Is there any way to do this? And if that is not possible, can anyone suggest an alternative to Drush especially for ...
12
votes
14answers
15k views

Can I delete nodes of a given content type with Drush?

Just wondering if Drush is capable of deleting nodes of a given content type. Something like: $ drush delete-node --type=MyContentType If not possible, can I create a method like that?
1
vote
1answer
252 views

Why do I get “Command pm-disable needs a higher bootstrap level to run”?

Running drush dis varnish in the Drupal directory gives give me this message. Command pm-disable needs a higher bootstrap level to run. Running drush --debug dis varnish -y gives the following ...
0
votes
1answer
95 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/...
0
votes
1answer
10 views

Drush hangs out on dl commerce_kickstart

in recent days new version of Commerce Kickstart 2 was introduced (v2.55). I tried upgrading my current installation (v2.54) using drush: drush --debug dl commerce_kickstart unfortunately after this ...
5
votes
6answers
4k views

Enable new modules dependencies on deploy

How can I automatically enable new dependency added on a custom feature (or standard modules) with drush? After getting the new code, my deployment script basically run: drush cc all drush fra But ...
4
votes
1answer
135 views

How to use drush config:set for translations?

https://drushcommands.com/drush-9x/config/config:set/ For one language site the command is: drush config:set system.site name "Drupal 8 English sitename" But how to be, if the site is multilanguage,...
0
votes
2answers
67 views

Trigger a drush @sites cr --yes daily [closed]

Drupal 8. Title sums up pretty much my question. I'm wondering what is the best way to rebuild all my site's cache daily. A cron job with Truncate table cache ? Module who rebuild cache on each ...
0
votes
1answer
67 views

Drush migrate-upgrade error

I have run drush migrate-upgrade successfully previously, but not when I run it, I am getting "An option named "Configure-only" already exists." I get this error regardless of if I have --...
0
votes
0answers
274 views

Drush installation problem on windows 10

I have problems running Drush on windows 10 with aquia desktop. The problem. I have folder structure c:\www\arlande.nl c:\www\itjobcoach Going into arlande.nl\web running drush is good : report is: ...
4
votes
2answers
886 views

Drush Command for Installing core

Is there a simple drush site-install script for Drupal 8? I've gotten very used to running the following script to install Drupal. drush site-install standard --account-name=admin --account-pass=...
4
votes
1answer
2k views

Fatal error: Class 'Drush\Log\Logger' not found in

Hi I'm getting this Drush error no matter which command I try. Any ideas on how to resolve this? I haven't been able to find other users reporting the same issue. I'm using Drush 8
5
votes
3answers
2k views

Can I automatically regenerate all images after using Drush image-flush?

I used drush image-flush to delete all generated image style images on my site. I know that image style images are automatically regenerated when you try to view them in a browser, but is there a way ...
2
votes
1answer
160 views

Local drush stops working after changing files and folder permissions

So I changed the files and folder permissions with the following commands on Drupal 8 and after that, I can't run drush commands unless I change file permissions to 777 find . -type f -print0 | xargs ...
2
votes
3answers
442 views

Drush is updated but not usable in Drupal 8 in Windows

Is this a bug? I've the version that does support Drupal 8, so what is actually the problem here? Update I followed kiamlaluno and seem to have updated Drush but I still get the same error. I haven'...
0
votes
1answer
162 views

How to pipe output of “drush sql-dump” without warnings

When I do: drush sql-dump > somewhere/database.sql if there will be any warnings printed by Drush, they will be included at the beginning of the created database.sql file. Can we avoid it somehow? ...
0
votes
2answers
217 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 ...
3
votes
1answer
390 views

Is it normal that Drupal enters maintenance mode during a module update?

I have created a custom module with an .install file, which includes some hook_update_N() and hook_update_N(&$sandbox) update hooks. These are used to update a collection of existing nodes. ...
0
votes
2answers
47 views

Can't acces my site and without login and drush clear cache

I moved my local site to shared host. all code has been deployed to the staging server I changed settings.php import the database from local to the staging server database When I try to reach the ...
2
votes
1answer
330 views

Drush is unable to update my site

I'm trying to update my drupal core though drush. But how hard i trie, it won't work. I''m using drush pm-update but it fails. Below the output of the drush debug. Tnx in advance Drush bootstrap ...
-4
votes
3answers
199 views

Did the Drush developers went “back and forth” when combining it with Composer?

If I'm not wrong about 4 or 3 years ago Drush was combined with composer, then it was "decombined" with it, till Drush 9 when they were recombined. If I'm accurate, why did this combine-decombine-...
2
votes
2answers
2k views

Choose a destination after drush cex

In my sites/default/settings.php I changed: $config_directories = array( CONFIG_SYNC_DIRECTORY => 'sites/default/config-sync', ); I created the folder config-sync in sites/default/ When I do ...
0
votes
1answer
122 views

Deleting translate interface strings programmatically or using drush

I need to delete some translated strings added using t() function, I've about 17000 string to delete is there a way to delete it using a SQL query or drush command? in which table those strings are ...
9
votes
3answers
4k views

Automatically update Drupal core/modules for a large number of sites (with Drush)? [closed]

I'm the administrator of a lot of Drupal websites on different hosting providers. Some have drush; others don't (and can't: like shared hosting). Every time there is a Core upgrade, I spend 1 or 2 ...
1
vote
2answers
2k views

Can't run drush from within website folder configured with IIS on Windows Server 2012

I am trying to setup Drupal 8 on Windows Server 2012 on IIS. I have installed PHP7.0 and Composer. Using Composer I then installed Drush globally using composer global require drush/drush:8.*. Drush ...
2
votes
1answer
787 views

Beginner Drush question. Can't get Drush to do anything!

I can't get Drush to do much. I can connect to my site by typing cd and then dragging my files to the terminal window in OSX using Acquia DevDesktop. My overall goal is to create a sub theme of Omega....
0
votes
1answer
19 views

CSV Article Migration giving random errors

I've been working on a personal test site for a while and wanted to set up another one for someone else. This just involves running a migration to import all the articles from a CSV file. It's worked ...
8
votes
5answers
10k views

The PHP version is not correctly detected

I'm running Drush on a host that has multiple versions of PHP installed. By default, php --version would give you 5.2.x, but php53 and php54 are also available. So in my .bash_profile I have alias php=...
-1
votes
1answer
66 views

Drush documentation

I'm curious if anyone else noticed how difficult it is to get drush working based on the available documentation? Drush is a great command line tool, and it's a pity that the official drush install ...
1
vote
2answers
2k views

Drush Not detect Database connection

I'm using Acquia DevDesktop application on Mac, I installed a new website on that , everything seems Ok but when I got to the installed path and try to update Drupal core with drush up faced with ➜ ...
0
votes
2answers
1k views

When I update my database schema with drush entity-updates. I get an error

When I try to update my database Schema I'm getting the following error: Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException:[error] The SQL storage cannot change the ...
0
votes
3answers
124 views

Does Drush 8.x work with core 7.x?

With the major changes to Drupal with version 8, it seems I would need Drush 7.x or earlier to work with Drupal 7.x. I tried to rebuild the cache and I got errors related to namespaces in PHP. It ...
6
votes
6answers
7k views

When attempting to run drush “: No such file or directory”

I've been bashing my head against the wall all day trying to figure out why Drush has suddenly stopped working. I've re-installed via composer, tried different versions, always the same error. If I ...
4
votes
1answer
633 views

Disable Drush backend messages by default

I am having a problem with drush backend message, how do I disable "--backend" by default ? command: $ drush make drupal-org.make drupal result: $ drush make drupal-org.make drupal DRUSH_BACKEND:{"...
0
votes
0answers
24 views

Drush 9 configuration-import on multiple sites at once [duplicate]

I have a project that uses a multisite and I want to be able to execute drush commands on that sites with just a single command. Example: drush @mysites.pro updb I'ts possible do that with drush 9?...
2
votes
1answer
159 views

Unexpected error during import . . . plugin does not exist error on drush config import

This is an issue I've had occasionally when trying to delete a plugin in a custom module. In this example, once a filter format filter plugin has been enabled it's impossible to remove. If you ...
1
vote
1answer
1k views

How do you update a data blob column by searching and replacing a string using drush?

How would one do the following in drush? I want to change some data in one of the users table for one of my users. The thing I want to change is in the data blob column with all the punctuation's and ...
10
votes
6answers
6k views

Drush installed and running; No Drupal site found even with uri specified

After much trial and tribulation, I thought I had drush all ready to roar. Much excitement. But then, no joy... Drush is working. The sites operate fine via MAMP. Regardless, a "drush cc all" command ...
0
votes
2answers
2k views

How to update core and all modules and themes from CLI?

On a LAMP environment I have a Drupal 8.5.6 website which is nearly all-core with the Bartik theme and a few stable contrib modules. Nothing is customized and I have daily backups so I don't "fear" of ...
1
vote
1answer
176 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 ...
33
votes
6answers
40k views

How to check Drush version?

How can I identify what version of Drush is installed on a given system?
0
votes
1answer
36 views

D7 - does drush rr ALSO clear cache?

Someone just told me that in D7, drush rr and drush cc all do the same thing. I can’t find anything that explicitly states the difference, nor can I find anything that supports such a claim. ...
6
votes
2answers
8k views

How to target specific sites with Drush when using Multisites?

I have a Drupal Multisite set up. It contains two sites, but the core Drupal install has no site. With Drush, I can use @sites to target all sites. For example: drush @sites -y cc all - Updates all ...
2
votes
2answers
407 views

Git workflow for Composer-based projects

I would like to install/manage Drupal with Git, Drush, and configuration synchronization. Should I add core/ and vendor/ into the .gitignore so that instead of pushing/pulling core I simply update ...
2
votes
1answer
222 views

Drush site-install and extra settings for the settings file?

We are developing a site with a make file, profile and drush-si. Thus far it's great, but i cant find a way how to add some slightly more complex settings to the settings.php file. For the beginning, ...
1
vote
2answers
644 views

Installing Drush on WSL

How do you install Drush on WSL (Windows Subsystem for Linux) when the following command from Drush docs, doesn't work? php -r "readfile('http://files.drush.org/drush.phar');" > drush
5
votes
2answers
717 views

Is it possible to run drush 8 smoothly on Win10 WSL (Windows Subystem for Linux)?

As most here know, Microsoft and Canonical worked together to develop a Windows-included Linux-based, Ubuntu-oriented compatibility layer (WSL) and already gives the option to install it for all ...