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

Drush migrate commands do not appear after fresh drupal 8 install using composer

I am trying to follow the upgrade using drush tutorial but I cannot get the migrate commands to appear in drush. On a new Ubuntu 16 box I do: #install a new drupal 8 composer create-project drupal-...
5
votes
1answer
2k views

Aliases stop working after composer install

We have added some drush aliases for a multi-site project, the aliases were converted from the previous syntax to the Drush 9 syntax (.yml files). I went over the documentation, and also saw the ...
5
votes
2answers
189 views

How to integrate the drush help --filter option with your custom module?

You can use the drush help --filter command to present a list of command categories to view. When you run the command: drush --filter=devel_generate you can see the following output: All commands in ...
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 ...
5
votes
2answers
2k views

drush default site alias

Is there a way of specifying a default site alias ? couldnt find it in drushrc example nor aliases example. motivation i am sclerotic and lazy :) usually running drush from the dir where the site is,...
4
votes
2answers
4k views

What does URI mean in drush site alias?

I want to create drush site aliases for my sites in order to use rsync. However, I'm not sure what URI means. Is it the (sub)domain I have assigned to my site, or the sites/ folder it is in? If it's ...
4
votes
1answer
854 views

When 'cron_safe_threshold' is set to 0 in settings.php, should the dropdown value on admin/config/system/cron be “Never”? or is it irrelevant?

I've installed Drupal 8.1.6. As Ultimate_Cron won't work on this site consistently or reliably, I've decided to just use Drupal's core cron, triggered externally (via /etc/crontab) rather than using ...
3
votes
1answer
215 views

Output array data on drush error when showing stack trace

I'm trying to install a module, but its giving me errors during a drush enable. It shows the stack trace log and I can see it has something to do with the flag_lists_type during the install process. I ...
3
votes
3answers
5k 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 ...
3
votes
2answers
4k views

How do I disable/enable a module on all sites within a multi-site Drupal installation using drush?

As an admin of a multi-site Drupal installation, I want to make module changes to all sites within that platform. On a regular basis, I want to disable/enable a set of modules to ensure consistency ...
3
votes
1answer
628 views

How to have an environment specific drush.yml?

I'm using Drush 9. With the old drushrc.php I could easily include a local.drushrc.php that dynamically set the site url. How can I do it now? This is similar to How can i set site url dynamically in ...
3
votes
2answers
878 views

Drush isn't bootstrapping drush script

I can't get drush to bootstrap my script. I'm using version 5.9. Below is my test script (test.drush): #!/usr/bin/env drush $site = drush_sitealias_get_record('@site1'); ...
3
votes
2answers
2k views

How do I use it in a system with 2 PHP-versions?

On my server there are two versions of PHP: 5.4 and 5.6. Using the shell PHP 5.4 is the standard and it can't be changed because of PLESK/ODIN. The websites I'm administering are using PHP 5.6 via ...
2
votes
2answers
2k views

To suppress this error, add the option --strict=0 Drush

My custom Drush commands use options(--ver,--env,etc). Whenever the option is used, I get message: Unknown option: --ver. See `drush help build-asset` for available options. To suppress this error, ...
2
votes
1answer
2k views

Why am i getting this Drush error after updating a site? [closed]

I use Drush 8.1.17 to update my Drupal 7 sites, and as I have been updating my sites today after the latest security update I have noticed that after I update a site if I try to run any update related ...
2
votes
1answer
729 views

drush sql-sync fails

drush sql-sync @devyau @stageyau returns: Call to a member function dump() on a non-object in /root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc, line 275 echo $PATH returns: /root/....
2
votes
2answers
3k views

Drush command errors

Drush on work machine doesn't seem to work at all for me. Executing drush up returns: Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional ...
2
votes
1answer
61 views

Getting an email notification when a new Drush version is available

With standard Drupal modules, you get an email notification when there's an updated version. How can we have this option with Drush? I searched the official http://drush.org website and ...
2
votes
1answer
4k views

How to solve “Query failed” error in drush sql-sync output?

This is a follow-on to my earlier question on this site. I hope posting it as a new question is appropriate. I'm trying to clone an existing drupal installation into a place on my mac with the ...
2
votes
2answers
907 views

drush migrate-manifest not found

I'm trying to migrate a D7 site to D8 following this tut: http://www.metaltoad.com/blog/migrating-taxonomy-drupal-7-to-drupal-8 When I run drush migrate-manifest manifest.yml --legacy-db-url=mysql:/...
2
votes
2answers
2k views

Drush Omega Guard - “command could not be found” or “could not locate Gemfile”

I have a multisite installation on Windows 7. I am now trying to execute the drush omega-guard command on an Omega sub-theme. When I am in the theme folder (sites\all\themes\theme_name) I get the ...
2
votes
3answers
487 views

How to disable all commerce modules from Commerce Kickstart using Drush?

I need to disable all commerce modules from the Commerce Kickstart distribution. I've done this before using the drupal backend admin/modules and have no problem at all but it took me around 4hs ...
2
votes
4answers
7k views

How do I update core to 8.4?

I checked the other questions related to this topic, but half of them didn't get any useful answer and the other half didn't help me out. I face with several issues building up a site using Drupal 8: ...
2
votes
1answer
233 views

How to avoid Drush command not found after switching to aegir or other user?

I installed Drush like this: It works fine when I am centos user, when I switch user to aegir it doesn't work. When I do which drush I get: How can allow user aegir to use Drush?
2
votes
2answers
525 views

Why does nothing change when I attempt to restore a backup?

I have a drupal 7.43 installation and it has been doing regular backups using the Backup and Restore module. I wanted to do a restore but I'm blocked at every turn it seems. I go to Configuration >> ...
2
votes
1answer
1k views

How can I use drush dd in bash script?

In a bash script I use drush site-set @foo_alias to simplify subsequent drush commands. I would like to compile my SaSS files using compass compile $(drush dd my_theme). However, for this case I ...
2
votes
4answers
4k 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
450 views

How to download directly to ~/.drush folder?

I've created a project that is basically a drush command with a starterkit folder. I noticed the make_local project will but I haven't figured out how it does that. I've tried the approach ...
1
vote
1answer
282 views

Drush 9 pulling incorrect site information on Multi-site

We have a multisite set up with Drupal 8.6.1 and Drush 9.4.0. This is set up on two servers that were set up identically. The issue we are running into is that Drush is only detecting defaultsite, ...
1
vote
1answer
151 views

How to move Composer created folder of drupal-8.x.x up one level to html?

So I created a fresh install of Ubuntu 16.04 and installed the LAMP stack, installed phpmyadmin and composer and then finally drush. Everything worked fine until I downloaded and installed Drupal ...
1
vote
0answers
2k views

how to install drush on mac getting error can't connect to local mysql [duplicate]

I'm trying to install drush on my local macbook. Drupal runs fine but when I try to run drush from cli: jackBook:drupal-7 jack$ drush status I'm getting the following response in the cli: <h1>...
1
vote
1answer
2k views

Which version of Drush should I install?

Drush 6 works great of corse on a Drupal 6 website, but will I have all of the Drush 6 features when working on a Drupal 7 website? Should I use Drush 7 when working on a drupal 7 website? I found ...
1
vote
3answers
3k views

curl nor wget was found

When I use drush to download modules, I get this weird error: drush dl registry_rebuild exec(): Unable to fork [wget --version 2>&1] exec.inc:150 [warning] exec(): Unable to fork [curl --...
1
vote
4answers
582 views

New Drupal installation not working beyond front page (not accessing database)

I just installed a new drupal 7.39 using drush. From the browser, I can only goes as far as the front page(welcome page) and no further. I cannot log-in, suggesting that drupal is not accessing the ...
1
vote
1answer
154 views

How to add extra option to the existing drush command?

I'm trying to add extra option to the existing command as below: /** * Implements hook_drush_command_alter(). */ function MYMODULE_drush_command_alter(&$command) { if ($command['command'] == '...
1
vote
2answers
934 views

Drush php-script | Drupal functions such as node_load() are not being found

I successfully installed Drush on Ubuntu 12.04, and I created a script containing the following line. print_r(node_load(10)); I am calling the script with drush php-script --uri=http://localhost ...
1
vote
1answer
229 views

Need Steps to Install multisite configuration using only drush. i.e multi-site install having different database

I need a help to install multi-site setup using only Drush that have multiple/different databases.I have already installed a site using drush but when I do the same steps for install another site into ...
1
vote
2answers
552 views

How to do menu rebuild when having PHP Fatal error?

I have been trying to get the command menu_rebuild(); to work on drush. However, I keep getting this error: I, of course, think I installed Drush correctly. However, I can't be 100% certain since I'...
1
vote
1answer
315 views

Drush Bootstrap Error on Multi-Site Install

I'm getting the "needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command." error. I know this means that Drush is not able ...
1
vote
1answer
2k views

How can I run Drush as user 1 in version 5?

Drush v3 had a --user flag (--user=1), however, this seems to be removed since v4, according to the website. How can I run Drush 5 as logged in as user 1?
1
vote
1answer
177 views

Applying Updates to Multiple Drupal Sites

I have over 100 drupal 7 websites on my single server. Applying updates to each site individually is a lengthy task. Is there any simple way through which we can update all the websites at once, or ...
1
vote
1answer
313 views

How to rsync files between two remotes which share the same host?

I've two remotes: @remote.dev and @remote.test. I'm trying to rsync between these two remote Drupal instances by: $ drush -vy rsync @remote.dev @remote.test But rsync complains that: The source ...
1
vote
1answer
1k views

Drush cache clear corrupting database?

I just moved to a new computer: Windows 10 with XAMPP. As far as I know I set everything up the same as it was on my old Windows 7 computer. But now, for some reason, much of the time when I run drush ...
1
vote
2answers
3k views

“drush rr” error

I am trying to perform a simple drush rr in my drupal directory. I have been able to do this before, but all of a sudden this no longer works. I have made changes to my drupal site, but I have no idea ...
1
vote
1answer
2k views

Drush hangs while executing any command

I am experiencing a strange problem while running drush commands on newly installed server and newly installed drush(it's been installed with composer). Exact the same configuration works fine on my ...
1
vote
1answer
226 views

Best practice for installing Drush?

I have been a Drupal site builder for some time, but I kind of got started with it backwards. Recently, I have begun learning more server-end things like Drush, Git, etc. I'm playing around with a ...
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 ...
1
vote
1answer
115 views

Which tables are safe to omit from sql-sync?

I sync my database with drush sql-sync @dev @live and the other way round. Can I omit the following tables safely, like in my drushrc.php from sql-sync? $options['structure-tables'] = array( '...
1
vote
1answer
391 views

Drush bootstrap fail - wrong MySQL username

drush sql-connect produces valid, working MySQL credentials: mysql --user=drupaluser --password= --database=core_20161101 --host=127.0.0.1 --port=33067 So does drush status: Database driver ...
0
votes
1answer
169 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 ...