Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [drush]

Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).

45
votes
6answers
86k views

Drush command to download AND enable a module

To download and install a module, I run: drush dl module_name drush en module_name -y I put that in a Bash script function, and just call "drin module_name" to simplify. function drin(){ drush dl ...
0
votes
2answers
57 views

Core doesn't update with Composer

We use commands: composer outdated drupal/* drupal/core 8.6.10 8.6.13 Drupal is an open source content management platform powering millions of websites and applications. It does show 8.6.13. We ...
2
votes
1answer
378 views

drush sql-sync error: [mysqldump: command not found]

I have a production server set up in my drush aliases as @prod, and a UAT server set up as @uat. I am using MySQL as the database of my Drupal sites. I can successfully execute drush command like ...
-1
votes
0answers
43 views

Drupal Console vs. Drush for Drupal 9 [on hold]

Initial Question: Are there advantages to using Drupal Console instead of Drush, because of Drupal 9? Revised Question after comments: Will any anticipated differences between Drupal 8 and 9 ...
1
vote
0answers
25 views

Body, files, and paths problems

I was suggested so many times to migrate my old project from D6, so I finally decided to jump into this. And as it always happens with Drupal, things never work as expected at first attempt. The old ...
0
votes
1answer
362 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 ...
2
votes
3answers
3k views

How to get one time login for all the users?

I want to send one time login for all the users, So I am using drush uli and getting link like: http://html/user/reset/1/1509979615/VBPx_FMfKeJUEt1moVcsSQGUMX_tFUSYEdEfRlmq7eA So if the user 5 ...
1
vote
2answers
1k views

How do I reset a user's name using Drush in Drupal 7?

To change a password I would use: drush user-password USERNAME --password="SOMEPASSWORD" Is there a similar way to change a user's name using Drush from the command line?
-2
votes
0answers
15 views

Features not detecting all revertible features in first pass

vagrant@www-xxx-com:/var/www$ drush fr xxx_inspiration Do you really want to revert xxx_inspiration.field_base? (y/n): y Reverted xxx_inspiration.field_base. [...
1
vote
2answers
374 views

Drush 9 can't find installed module, yields CommandNotFoundException

On my newly installed Drupal 8.4.4 sandbox installation, I've installed Drush 9 and the Devel module: composer require drush/drush:^9 composer require drupal/devel After running these commands, I ...
0
votes
1answer
471 views

How to get the drush command defined in migrate tools to work?

I have a D8 site since some months. Today I realised that I needed drush in order to migrate some contents (using the migrate tools module). Composer was not installed, so I installed it. Then I ...
1
vote
1answer
527 views

Drush installed in local directory but command not found?

I know that Drush is a huge time saver so I'm trying to get familiar with it but I keep getting command not found error after installation. I've required and removed Drush a couple of times just ...
1
vote
0answers
25 views

Post update hook fails to run via Drush, but works via update.php

I've implemented hook_post_update_NAME to bulk import some files into Drupal (creating file and media entities for them). This hook runs correctly when I use update.php. But it seems to silently fail ...
11
votes
4answers
8k views

Linux Drush install error: Undefined class constant 'MYSQL_ATTR_SSL_CA' in phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php, line 56

I tried installing Drush with both methods listed in the drush.org documentation. I think they might be conflicting with each other if that's possible. When I run composer global require drush/drush ...
1
vote
4answers
3k views

How do I resolve this installation error?

I am getting the following error while installing Drush with composer require drush/drush. Using version ^8.1 for drush/drush ./composer.json has been updated Loading composer repositories with ...
0
votes
1answer
393 views

What version of Drush is compatible with Drupal 6 / PHP 5.2

Just installed drush on a system using PHP 5.2. However, when I run drush, a message is displayed saying Your command line PHP installation is too old. Drush requires atleast PHP 5.3.0. To suppress ...
2
votes
1answer
23 views

How do I clear a specific cache entry?

I saved a cache entry using cache_set(). How can I clear this entry using Drush?
0
votes
1answer
23 views

How to fix drush issue “Could not bootstrap at phase 5”?

I installed drush via Composer. I am using drush 9.5.2 with Drupal 8.6.4. I mention that everything is fine on local. However, in a docker instance in GitLab CI, when I execute vendor/bin/drush ...
1
vote
1answer
419 views

Drush not working on a docker based enviroment on ubuntu 16.04

I have set up a local dev docker environment with the drupal social distribution. My issue is that drush commands do not work and whenever I issue a drush command, it takes approximately 45 seconds to ...
0
votes
0answers
30 views

Do we need any init steps in this scenario?

In Order to install Drupal Core using Code deploy, I follow these steps. Download drupal-7.x.zip /usr/bin/unzip -o /tmp/drupal.zip /bin/mv /var/www/drupal-7.x /var/www/drupal Similar steps to ...
3
votes
1answer
1k views

Order of drush commands for automated deployment?

What order should the following drush commands be ran? config-import updatedb entity-updates Also, I see entity-updates fail a lot due to field_delete_data* tables existing. How can I delete them as ...
-1
votes
0answers
32 views

Recommended way to migrate from drush 8 to composer [duplicate]

I have a website that I built some time ago using Drush 8. I do not exactly remember how I built it, but I think I used some drush command to create the basic Drupal site and then I used other Drush ...
1
vote
1answer
32 views

setContainer Error When Registering an EventSubscriber Service

I am trying to create a basic event subscriber, but when I add the services.yml file and attempt to rebuild the cache with drush cr, I get this error. In Drupal.php line 130: \Drupal::$...
0
votes
1answer
28 views

Drush Feature Update removing t() and l() function usages

I have a feature that currently has things like this: 'body' => '<h3>' . t('Welcome back') . '<span class="fname">%user:field_first_name</span>!</h3>', However, using ...
0
votes
1answer
403 views

Drush error on Mac

I installed Drush using Composer globally but when I try to clear the cache I get the following: No Drupal site found, only 'drush' cache was cleared. [warning] 'all' cache was ...
2
votes
1answer
560 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/...
0
votes
1answer
30 views

Running Drush commands on a given path

Instead doing: drt="/var/www/html` domain="example.com" cd "$drt"/"$domdain" drush pm install redirect token metatag draggableviews elementor drush en language content_translation redirect token ...
0
votes
1answer
17 views

After upgrading from drush 7 to 8 with multisites, using drush from site directory cannot find drupal 7 (Windows)

Previously with drush 7, I could cd to the site directory (e.g. sites/example1.com) and perform drush commands (e.g. drush st). Now with drush 8, unless I specify the root in the drush command, it ...
0
votes
1answer
410 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) ...
5
votes
0answers
343 views

How do I make an archived-dump of my site?

I have multiple versions of drush and cannot make an archive-dump of my site. drush8 ard/drush8 archive-dump returns [error] The drush command 'ard' (and/or 'archive-dump') could not be found. ...
1
vote
1answer
433 views

Installing a New Site with Drush and Ansible

I'm trying to create an Ansible Role to run on a VM that creates a new site (so my colleagues don't have to memorize the drush si --db-url command and automate the entire process. I'm running into a ...
1
vote
2answers
435 views

drush pm-update “File drupal6-eol is corrupt (wrong md5 checksum).”

PHP version 5.3.3 Scientific Linux release 6.5 Carbon (like CentOS/Redhat) Can't update a Drupal 6 site using Drush 6.x. Installed Drush 6.x using composer. "drush pm-update" produces the following, ...
35
votes
2answers
23k views

How to switch from recommended release of module to dev release?

For example, I'm currently using the Geofield module. I'm using version: 7.x-1.0-beta2 (2011-Nov-17) Now I see the development version has some functionality that I want. How do I correctly and ...
1
vote
2answers
6k views

The Nivo Slider library could not be found

This is the first time I use a CMS, and I'm trying to install nivo slider module into Drupal. I used the following commands drush dl nivo_slider drush en nivo_slider -y Then I added some pictures to ...
0
votes
1answer
19 views

drush language importing untranslated strings

I am having 2 environments. A staging and a production one. I want all string to sync the strings, so that whenever a new string comes to staging it is available for translation in production. For ...
0
votes
0answers
9 views

Access Denied For valid users

Backstory: Our website had the meta-tag http issue described on this post: https://www.drupal.org/project/metatag/issues/2842049 I can resolve this issue by applying either solution 24 or 31. ...
1
vote
1answer
467 views

Drush - nothing happens

if i'm in my drush console at my drupal dir /xampp/htdocs/drupal and type in something like "drush en color" nothing happens. why? @tunic same again
-2
votes
0answers
25 views

drush cr command error [closed]

Why I'm getting this error when I'm trying to rebuild cache in drupal 8? Command cache-rebuild needs a higher bootstrap level to run - you will need to invoke drush from a more [error] ...
0
votes
1answer
27 views

Non-standard port with aliases

I'm running Drush 9.5.2. I set up a site alias. Drush recognizes it, but it will not connect via SSH. I get the following error: ssh: connect to host mysite.com port 22: Operation timed out The ...
0
votes
0answers
77 views

Error on drush command: In ThemeHandler.php The theme does not exist

I manage to broke the default theme in development and now could not access the administration interface nor could I change the theme via drush. The way I broke the default theme is by changing the ...
2
votes
1answer
42 views

Generate installed modules into a composer.json for existing site: I need to manage via Composer, not via UI

I have a Drupal 8 site up and running with modules that were manually installed. I want to generate an appropriate composer.json file to manage these using Composer. The closest I could find to ...
0
votes
0answers
29 views

sql-dump piping output to the screen

I am trying to dump a remote Drupal site to a local SQL dump file. In Drush 8 this worked a treat: drush @site.alias sql-dump > ~/Dumps/dumpy.2019-02-19.sql Now, if I run this command in Drush 9 (...
0
votes
1answer
474 views

Drush command terminated abnormally

I'm using https://github.com/drupal-composer/drupal-project and get an error when starting drush: [~/public_html/drupal]# alias drush="~/.composer/vendor/bin/drush" [~/public_html/drupal]# drush [...
0
votes
1answer
40 views

Enabling custom content entity module throws error

While enabling my custom module that creates a custom content entity through Drush, I get the following error: [error] Drush command terminated abnormally due to an unrecoverable error. Error: ...
0
votes
0answers
26 views

Drush not functioning

I upgraded my DevDesktop a few months ago and since that time Drush has stopped working for all my ADD sites. When I run drush -v, for example, I get this: -bash: drush: command not found I ran ...
1
vote
3answers
1k views

Can't get drush to work after moving to Acquia Dev Desktop

I installed Acquia Dev Desktop. Most things work but drush does not. I get an error: Drush was not able to start (bootstrap) the Drupal database. Because I had previously installed php and mysql on ...
0
votes
1answer
553 views

Config import constantly showing configs to import

Recently after doing a config import via drush (drush cim sync), the config files don't seem to import properly, as the files are listed after a supposed successful import. (and doing a cex sync shows ...
1
vote
2answers
228 views

xmlrpc() error: (-1001) unable to parse URL during Drush command

I have an odd error coming from Drush when I perform module updates and other commands (it's most consistently comes from module updates). Near the end of the command execution this message pops up: ...
1
vote
2answers
574 views

Update website from 8.0.0 to 8.6.1

I'm pretty new to Drupal and I'm trying to update a website from 8.0.0 to 8.6.1. I've followed the guide here: https://www.drupal.org/docs/8/update/update-core-via-composer The composer part went ...
-2
votes
1answer
461 views

How to use Drush or Migrate module to create/edit/delete nodes hourly

I need to Create new nodes (W/12 fields) hourly from a new table/fields in the Drupal DB (x_table). Update currently created nodes via current x_table rows. Delete nodes once the row has been ...