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
6
votes
2answers
1k views

Change module settings stored in an array with drush

I would like to configure a module (addtoany) settings with drush. This is the variable: addtoany_nodetypes: Array ( [about_us] => about_us [contact] => contact [page] => page ...
4
votes
1answer
563 views

How do I link Drush to my Drupal site on Pantheon?

A friend of mine got me into Drupal and did the initial setup for me. At first, I was using localhost to play with Drupal and Drush to download and enable modules. Now I have my own Pantheon hosting ...
0
votes
1answer
397 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 ...
1
vote
1answer
1k views

How to get Drush in my path in Windows 10?

I have Drush 9 installed on Windows 10. I installed it via Composer using Lando. I want to put this drush in my system path so that I can use it from cmd.exe, Powershell, and so on. I want to do ...
0
votes
0answers
25 views

How to install the module Entity Browser?

I'm trying to install the Entity Browser module, but I'm getting this error: It basically says that the "entity_browser" entity type does not exist, and based on the error I tried to install the ...
0
votes
2answers
2k views

How do I convert a pre-existing site to a Composer-managed application?

The latest Drush 9.x version recommends that Drupal 8 sites will be built using Composer, with Drush listed as a dependency. However, when you install Composer and Drush globally per step #1 on http://...
0
votes
1answer
349 views

Can't use drush site-install to drop tables and reinstall in MAMP

I have a local multisite instance running MAMP 3.0.7.3, and I can't use the drush site-install command to do a re-install of one of my sites without actually dropping the database first. If I try the ...
1
vote
1answer
427 views

cannot use some drush commands

I am running into some trouble with drush I can't pm-enable the modules I just downloaded with it. I did some research but none of the solution worked for me, most cases involved switching "localhost" ...
1
vote
1answer
93 views

Set site URI for drush uli without 'default'

Versions discussed: Drupal 8.6.13, Drush 9.6.1. This is somewhat similar to How to have an environment specific drush.yml? except that the other thread is now four or five months out-of-date and ...
0
votes
2answers
388 views

Translate untranslated strings

I downloaded and enabled translations for my Drupal core and modules using these Drush commands: drush dl l10n_update && drush en -y $_ drush language-add lt && drush language-enable $...
2
votes
2answers
510 views

Acquia Dev Desktop and Drush broken with syntax is incorrect

I did a clean install of Acquia Dev Desktop (Build Nov 13th, 2017) under Windows 10. I can clone my site (Drupal 8) and then click to open my local Drush console. It opens a DOS prompt into the ...
1
vote
1answer
88 views

Revert back to the previous dev version of a module using composer

Current last dev release of the Field Group module for drupal 8 was out on (29 Mar 2019). However, I need to download the previous dev version before the dev version release mentioned above. The last ...
-1
votes
2answers
2k views

How do I set up PHP configuration?

I am running websites on my PC with following php5: /etc/php5/apache2/php.ini (this is what I can see when running phpinfo() command within website php code). How to set Drush, so it would use ...
0
votes
3answers
364 views

Drush can't DL modules - xml error

I'm working in a Linux server with PHP 5.3.3 installed along with Drush 6.2 (?) I'm unable to dl modules to the server. When I add --verbose to the command, I see the following. Executing: wget --...
3
votes
4answers
719 views

What does Drush error “Unknown option: --db-url” mean?

Somehow user 1 has become blocked on a Drupal site I manage. As a result, I can't issue a uli command via Drush. I tried to use the command drush @pantheon.xxxxxx.dev user-unblock --uid=1 but it ...
1
vote
0answers
52 views

Cannot update Acquia Dev Desktop Drupal Core 7.61 to 7.65 through Drush

I did a brand new install of Drupal 7.61 using Acquia Dev Desktop 2. I selected a "Standard" installation profile after launching the site in a browser. I tried to update Drupal Core through the Drush ...
0
votes
1answer
357 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 ...
1
vote
1answer
121 views

How to install drush properly

I am trying to install drush on my new computer and it's a mess I'm on Mac Os High Sierra, with Mamp 5.3, PHP 7.2.14 I'm mainly interested in Drupal 7 On my previous computer, it was simple i just ...
0
votes
1answer
40 views

How do I tell Drush where the root directory is?

I have successfully installed Drupal 8 with Composer and I also installed Drush with Composer. When I use Drush, it says that the Drupal root is not found. I am passing the root, but it still says ...
10
votes
2answers
4k views

How do I use Drush 8 site aliases in Drush 9?

In Drush 8, my site aliases are loaded correctly from ~/.drush/mysite.aliases.drushrc.php. E.g. $aliases['dev'] = array( 'root' => '/var/www/html/mysite.dev/docroot', 'uri' => 'mysite.prod....
45
votes
5answers
87k 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
537 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
409 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
vote
0answers
42 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 ...
3
votes
3answers
4k 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
2k 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?
1
vote
2answers
413 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 ...
1
vote
0answers
49 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 ...
12
votes
4answers
9k 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 ...
2
votes
1answer
31 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
212 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 ...
0
votes
0answers
35 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 ...
1
vote
1answer
41 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
50 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
33 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
20 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 ...
5
votes
0answers
420 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. ...
34
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
23 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
32 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
84 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
133 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 ...
3
votes
1answer
259 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
67 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
50 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
47 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 ...
1
vote
2answers
230 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: ...