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
5
votes
0answers
455 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. ...
5
votes
1answer
142 views

Update core keeping other composer packages

After upgrading Drupal to the last version with Drush (8.1.15) the other composer.json dependencies (e.g. drupalconsole) are removed. Are there any way to update Drupal with Drush keeping other ...
4
votes
1answer
4k views

Update drupal modules without updating core in one drush command

Is there a way to update all contrib modules without updating core in one drush command. For example: drush up updates all modules and core. Is there a way to ignore core and just update the ...
4
votes
2answers
4k views

Can I set Drush to always use verbose?

Its quite annoying to have to type -v. Is there a way to change the drush settings so that it will always use verbose mode so I dont have to bother typing -v?
4
votes
2answers
4k views

Get an error if I run the pml drush command line

I just started to use Drush and I think I have some miss-configuration somewhere. I use MAMP (on mac) and s/Applications/MAMP/htdocs/subastas is the folder for the Drupal installation. The error ...
4
votes
5answers
1k views

How can you gitignore items in a Drupal project without modifying core?

I have a Drupal project, and we want to use Git for version control, but we need to have some folders that are ignored by Git. The problem is that .gitignore seems to be a core file. After the last "...
4
votes
2answers
6k views

Drush was not able to start (bootstrap) the Drupal database - MySQL Access denied error

I've installed Drush 7 using Composer and working with Drupal 8 and 7 on Ubuntu 12.04 with PHP 5.4.31, mysql 5.5.38 Drush will dl modules and themes just fine but when I want to en a module then it ...
4
votes
2answers
3k views

Automate clear of mysql database in drush site install

Is is possible to automate clearing the database when I run site install? e.g. here is my drush command: drush si geoslate --db-url='mysql://root:root@localhost/geo_test' --site-name=Geoslate But ...
4
votes
6answers
14k views

Command pm-enable needs a higher bootstrap level to run [closed]

I've been scouting the forums for the past two days trying to get an answer to my problem, i'm new to Drush but pretty good with Drupal. my environment is as follows: centos 6 php 5.3.3 drupal 7....
4
votes
3answers
2k views

Is it possible to do a drush sql-sync of only certain tables?

I have 4 environments between my local, dev, staging, and production. A large amount of content is published to the staging environment on a daily basis, so that is the center of my workflow. Once ...
4
votes
3answers
4k views

Creating a new user role with Drush

I can do loads of user-related stuff with Drush, but I can't see how to create new user roles. Is it possible to do this with Drush?
4
votes
1answer
3k views

drush: How to upgrade to a stable module release instead of dev?

When I use drush pm-update it takes always the latest which is usually a dev release. How do I force it to update to the next stable release?
4
votes
3answers
125 views

How to setup Drush core development environment?

I would like to create a PR against Drush, so one of the core commands has additional options. But I'm not really sure, how should I setup my development environment, so I'm not losing my time moving ...
4
votes
3answers
10k views

How to use Drush in remote server?

I'd like to use drush methods in the remote server. As far as I know I have to install Drush in the remote server. But my server provider tell me that Drush has many conflicts with other modules that ...
4
votes
2answers
3k views

How I change my Site URI in Drupal 8

In Drupal 7 I put in settings.php this: $base_url = 'http://mysite.local'; And when I run: $ drush uli http://mysite.local/user/reset/1/1460387746/mTqwCdJ7hi_pmrPRuFOScYwFtoHTmVAW07MV23O3UVk/login ...
4
votes
2answers
3k views

Is there a way to pass additonal php.ini settings to a drush command?

I want to specify additional php.ini settings to a drush invocation in the manner they would passed using -d option if drush was a php script that could be passed to PHP using the -f parameter. On ...
4
votes
1answer
3k views

Drush from GitHub stopped working

I have a Github clone of drush that has been working since it moved there. I did a git pull this morning, and am now getting errors: $ drush Warning: require(/home/mpd/drush/vendor/autoload....
4
votes
4answers
4k views

How to install drush extension / addon globally?

I want to install drush-toolbox project globaly on my linux server box so all users can use it. How can I do it?
4
votes
1answer
1k views

Should a site be in maintenance mode when running the Drush Up command?

I'm not asking if I can update my website with Drush. I'm not asking if Drush can make it in maintenance mode. My question is ... if I'm using the command drush up to update my Drupal core or a ...
4
votes
3answers
6k views

Drush and mysql database (with MAMP) connection problem

I have a problem running some drush methods involving database connection. I run the free version of MAMP. If I run methods like si or pml I get no problems But if I run the drush archive-dump ...
4
votes
5answers
2k views

Possible to use drush to list overrides for all features?

I believe that drush features-diff will list the overrides for a specific feature and that drush features-list will list all features. Is it possible to list all of the overrides for all features, ...
4
votes
1answer
1k views

drush sql-dump asking for password

Whenever I run drush sql-dump it will prompt me for the database password. Is there a way that this can be done automatically? I don't quite understand why its not just reading this from settings.php ...
4
votes
2answers
262 views

How to obtain a list of the submodules of a module using Drush?

I want obtain trough drush a list of the availables submodules that comes inside a module. So far this is what I have achieved: drush pmi views_* I obtain a detailed info for all the modules and ...
4
votes
3answers
10k views

How to install drush 8 properly?

I'm trying to install drush 8 via composer: composer global require drush/drush:dev-master (source) but it gives me drush version 7.0.0 which is without D8 integration... I'm using Linux Mint 17.
4
votes
1answer
447 views

Is drush required on the remote server to do sql-sync or rsync operations?

I am working my way through the Drush chapter in Definitive Guide to Drupal 7 by Apress. I want to sync the mysql database and files to/from my local MAMP developer stack and the remote live server (...
4
votes
2answers
5k views

How to restore a site from a backup done with Backup and Migrate module using Drush

Just that. I've a backup using the backup and migrate module. I've done some changes and now the site is down. I can't restore the site using the admin interface (because it's broken). Can I use ...
4
votes
1answer
1k views

Type of drupal cache to be cleared on new hook implementation

If I implement a new hook which cache type(like menu, css+js, etc) should I clear for the changes to take effect?
4
votes
3answers
2k views

“Unknown engine type outputformat”

I did a Drupal 7 update using drush up and received the following message, repeated numerous times: Unknown engine type outputformat Since that update, Drush does not work, but rather returns the ...
4
votes
1answer
3k views

Unable to install modules with Drush [duplicate]

I've got a fresh install of the Drupal 8 Beta 12. I'm trying to install the REST UI module: $ drush dl restui-8.x-1.x-dev PHP Fatal error: Class 'Drupal\Core\Session\AccountInterface' not found in /...
4
votes
4answers
751 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 ...
4
votes
6answers
6k views

Drush doesn't detect drupal installation under sites sub-directory

I have been using Drush 4 and 5 with no problem. Now that I have downloaded and installed new Drush 7.0-dev using composer, I am having problem i.e it doesn't by-default detect drupal installation ...
4
votes
1answer
359 views

Using drush to change options of contrib module

I would like to use drush to change one of the options stored in a large options field of a contrib module configuration table. drush vset/vget, as far as I know, only work on the options that are ...
4
votes
1answer
182 views

Why does drush rsync require a local site?

It's clearly documented that drush rsync requires one of the sites to be local. I'd like to understand why this restriction is in place. I have configured site aliases to work with ssh, and I'm able ...
4
votes
2answers
3k views

How to create Content Types with Drush

Is it possible to create content types with Drush? Such as a new Galery content type? I created a content type manually via web interface and checked the changes in database. However, there are quite ...
4
votes
2answers
1k views

Unable to set Drupal environmental variables using Drush alias

$aliases['opendoor_stage'] = array( 'uri' => 'stage.opendoor.com', 'root' => '/var/www/stage.opendoor.com', 'db-url' => 'mysql://someurl', 'path-aliases' => array( '%...
4
votes
3answers
17k views

How do I install a patch file?

I was trying to google the method to install a patch file, but the results keep returning as "issues encountered while patching", which isn't what I am looking for. I was wondering how to use drush ...
4
votes
1answer
1k views

Replace data from command line: site name

I run in mysql: update variable set value = replace(value,'SiteName','NewName'); and then clearing cache: drush cache-clear But I dont know why the site name become blank instead of NewName I've ...
4
votes
1answer
609 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 ...
4
votes
1answer
437 views

How do I import a database through a Drush(PHP) script?

I am trying to write a Drush script locally to speed up some repetitive tasks. I am running in to issues importing a database through the script. I have tried using drush_invoke and ...
4
votes
2answers
77 views

Configuring Modules in Install Profile

I'm working on an install profile which brings in various modules and I was curious about the proper (or popular) convention for setting global variables Right now I have two different ways of doing ...
4
votes
1answer
2k views

Drush sql-sync not working on multisite

I use drush site aliases and drush sql-sync as part of my daily workflow between my local development environment and my company's production/staging servers (Acquia dev cloud). This works great for ...
4
votes
2answers
574 views

Custom redirects and Drush/updates

I usually update Core with Drush, because it's so easy and wonderful, but I have a custom htaccess and it always overwrites it, forcing me to rely on a checklist where I have to go and put my custom ...
4
votes
1answer
3k views

'drush rsync' not excluding paths specified in 'exclude-paths' in “aliases.drushrc.php”

I'm trying to get drush-rsync to exclude files/paths that as specified in my alias definitions. In /etc/drush/aliases.drushrc.php, I defined $aliases['site_A'] = array( 'root' => '/home/...
4
votes
1answer
2k views

Drush one line command to create field

I want to create field with name img for content type announcement From the documentation, I can type drush field-create announcement. After that typing the field name img, after that type 2, lastly ...
4
votes
1answer
3k views

How to set up drush aliases for a local server for rsync?

I'd like to use drush to sync files from local server to production server. I have edited the aliases.drushrc.php file and placed inside /drush/aliases in both local and remote machines. Everything ...
4
votes
1answer
155 views

How to disable creation of node revisions on programmatic node update?

I added a field of type computed field to existing nodes. It's required to re-save the nodes to set/update computed field values. As I do not want to update the changed timestamp I decided to not use ...
4
votes
1answer
176 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,...
4
votes
1answer
125 views

What tables are affected by “drush cc all”?

What database tables are affected from drush cc all? Obviously, I could gather all the tables starting with cache_. Is there any other table that is affected by this command?
4
votes
1answer
801 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 ...
4
votes
2answers
3k views

Where does drush look for the path of the mysql socket (on MAMP)? [closed]

After upgrading from drush 6.5.0 to 8.0.1-dev through brew, the drush terminal command returns the popular 'PDOException: SQLSTATE[HY000] [2002]' error. The only way to make it work is to add the ...