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
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 ...
6
votes
5answers
5k views

Can I create nodes through drush for particular content type

I have different content type in my site. For testing purpose, I want to add content to all content type form, but manually its not possible in such short term. So, is any Drush command available to ...
6
votes
1answer
62 views

Create OS user specific Drush commands

I know how to create drush commands in a project, but there are a number of commands which I would like to add to my local system simply because they affect my particular workflow a lot. In Clisp, I ...
6
votes
2answers
1k views

Drush @sites not implemented in drush 9

Since drush 9 (drupal 8.4 requirement), alias @sites does not seem to be implemented anymore (or yet ?). $ drush @sites cr The alias @sites could not be found. Is this a way to get the same behavior ...
6
votes
2answers
4k views

How can I tell drush to use another php.ini file? [closed]

I've gone through the setup instructions on https://github.com/drush-ops/drush, but I can't seem to get drush to use a different configuration file, very frustrating. I've already added the PHP_INI ...
6
votes
1answer
79 views

Drush get all non-required modules

In Drupal, the Module Filter module adds four search filters to /admin/modules: Enabled Disabled Required Unavailable If "Required" is unchecked, the admin page will only show modules that are not ...
6
votes
0answers
460 views

So, running Drush update messed up your SVN repo

I'm working on a client's site. We had the sites folder as the root of a SVN repository. At some point we ran drush to do module/core updates but Drush was (mistakenly) set to ignore the repository. ...
5
votes
9answers
6k views

Drush CC all returning “No Drupal site found, only 'drush' cache was cleared”

I've tried other solutions, but none of them are specific to my setup. I just started using the new Linux subsystem featured in the recent Windows 10 update. I'm using WAMP x64 v3.0.6, and have ...
5
votes
5answers
3k views

Can drush show list all available modules?

With yum you can do yum list available ..., and know the name of the package you want to install. For example, there is the Mime Mail module in Drupal. What name should I use with drush dl, ...
5
votes
6answers
6k views

Why doesn't 'drush cc all' work?

I installed Drush, but most of the commands doesn't work, I guess. I tried drush cc all and got the following output: Command cache-clear needs a higher bootstrap level to run - you will need ...
5
votes
7answers
6k views

Drush installation problem - Non-empty values for magic_quotes_gpc

I have successfully installed and configured Drush and i am able to work with it. Unfortunately, I am getting an error like this: The following restricted PHP modes have non-empty values: ...
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,...
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
3answers
2k views

“Uncaught ReflectionException: Class DOMDocument does not exist” error

On Ubuntu 16.04, I installed Drush using Composer: composer global require drush/drush:~8. Installation succeeded, but running drush --version, I got this error: PHP Fatal error: Uncaught ...
5
votes
5answers
8k views

After installing composer: “The drush command X could not be found”

Edit: re-wrote intro paragraph to highlight the installation of composer - I suspect composer may have broken drush. I want to test out elastic search with D7. I used drush to install a fresh D7 ...
5
votes
3answers
1k views

How can I setup Git/Drush dl/make caching of Drupal projects?

I'd like to setup the ability to have Drupal projects cached locally when I do a Git clone or Drush dl/make, so that if I happen to be offline or just to save bandwidth, when I Git clone/Drush dl/make ...
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 ...
5
votes
1answer
434 views

How do I disable a module when Drush or the GUI doesnt work?

My site just gives a WSOD and throws this error: Error: Unsupported operand types in sites/all/modules/rules/includes/rules.state.inc, line 620 Since I can't even get to my site now without a WSOD,...
5
votes
3answers
3k views

pm-update fails updating drupal-core and deletes everything

I need to update drupal install (core files + some contrib modules) through drush but as I run drush up it first correctly update the contrib modules but then fails on updating the core. The main ...
5
votes
3answers
2k views

How to make drush un-install modules without confirmation

I want to create a drush command that reinstall some modules. I've done something like this: $modules_to_uninstall = array("my_module1", "my_module2", "my_module3", "my_module4", "my_module5"); ...
5
votes
3answers
703 views

Is there a difference between “Clear cached data” button on the performance page and drush cc all?

Is there a difference in what caching is cleared between drush cc all and Admin > Site Configuration > Performance > Clear cached data button ?
5
votes
2answers
158 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
1answer
3k views

Changing theme in Drupal 8 via drush in the command line [duplicate]

In drupal 7 I used to just do a drush vset theme to change the theme in the command line, but that doesnt work in drupal 8 anymore. How would one change the theme in the command line for drupal 8 ...
5
votes
2answers
4k views

How to safely remove drush via pear and then install via composer?

I have drush 5 installed on my VPS running CentOS 6. Drush was installed using PEAR. Can I just remove the drush directory and the simlinks and then install drush 7 using composer? I have been ...
5
votes
2answers
718 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 ...
5
votes
4answers
435 views

How do I programmatically create a list of new users?

I'm trying to use the following drush script, but I keep getting errors. Currently, it is not properly setting the user role to Premium. #!/user/bin/env drush <?php $users = [ "name" =&...
5
votes
1answer
7k views

Drush installed globally via composer as root user, but how to access Drush with ordinary user?

By following the instructions on the Drush git page: composer global require drush/drush:6.* I have Drush up and running (it seems to live in /root/.composer/vendor/drush/drush). But I imagine I ...
5
votes
2answers
5k views

Drush alias - @alias status could not be found

Problem I'm trying to create a drush alias following the excellent example posted here. EXAMPLE: $aliases['dev'] = array( 'root' => '/path/to/drupal', 'uri' => 'dev.mydrupalsite.com', )...
5
votes
2answers
4k views

Does the drush up command work on multisite?

I have to update all sites on a D7 multi-site installation. I normally deal with single installation and I use drush up to update the core, modules and db. I have no prior experience with a multi-site ...
5
votes
3answers
2k views

Update module with Drush + commit with Git

What's the best way to update a module and commit with git? Currently I'd use drush pm-updatecode then inspect with git status. The problem then is there are many files that have changed, been added ...
5
votes
3answers
1k views

how to display the machine name of module at /admin/modules?

I use Drush to enable and disable module, to do this I need to know the machine name of the module. At /admin/modules I can see the list of modules, but this list doesn't show the machine name, jut ...
5
votes
1answer
1k 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
4answers
2k views

Unable to load class \Drush\VersionControl\Backup

I keep getting this error : Unable to load class \Drush\VersionControl\Backup every time i attempt to update my Drupal install from 8.4.0 to 8.4.2. I am running the composer provided drush Drush ...
5
votes
1answer
2k views

What is the purpose of key_value_expire table?

In Drupal8, what purpose does the key_value_expire table data serve? Can that be excluded from a database backup? I ask because, during development, I backup the database using "drush sql-dump --...
5
votes
1answer
467 views

How do you disable modules in bulk via Drush matching a specific pattern?

Currently I have to disable all of the ubercart modules in bulk, but there are too many of them to do it one at a time via the modules page. And doing it via drush doesn't disable every module related ...
5
votes
1answer
1k views

In Drush what is the difference between ard and arb?

In Drush what is the difference between ard and arb commands? When should I use one over the other?
5
votes
1answer
1k views

When running DB updates, in what order are module update hooks called?

I'm watching a Drupal 6 to 7 upgrade run, wondering at the order these updates are called. Aside from being in numeric order per each module, it seems that the module updates have been combined and ...
5
votes
4answers
7k views

How to push changes from a dev environment to prod

Our team of 10 developers would like to use Dev, Test, Staging and Production environments for our large site. How can we streamline pushing our changes from one site to another, keeping them as ...
5
votes
1answer
215 views

How do I drush vset a number with decimals?

drush vset latest_version 6.34a latest_version was set to "6.34a" So far so good. drush vset latest_version 6.34 latest_version was set to 6. Hmm... drush vset latest_version '6.34' ...
5
votes
1answer
2k views

What is the different between an install profile and a drush make file?

I am just getting into using drush and excited about using drush make and installations profiles. What is the different between a drush make file and an installation profile and do they /can they work ...
5
votes
4answers
4k views

No Drupal Site Found when clearing cache [duplicate]

I installed drush using composer following the instructions here: http://docs.drush.org/en/master/install/ When trying to run drush cc all I get this error: No Drupal site found, only 'drush' ...
5
votes
2answers
569 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 ...
5
votes
2answers
1k views

Updating core with Composer doesn't work

I am on D 8.3.0-rc2 and want to update to D 8.3.0 stable. Composer is my only option (requirement of address module). Composer core update doesn't bring me beyond 8.3-0-rc2, not even forcing it. ...
5
votes
4answers
4k views

How do I set the drush tmp directory?

I understand how to use /etc/drush/drush.ini; however, I don't know what exactly to put in there in order for Drush to use a different temp directory when creating an archive-dump.
5
votes
1answer
145 views

Why to use hook_drush_help() when we have 'description' in hook_drush_command()?

When you go to create new drush commands you can define the 'description' element inside the hook_drush_command(), and if you use drush help your_command you will see this description as output. ...
5
votes
2answers
413 views

Unable to debug drush command using xdebug with batch api

I have been debugging drush commands with xdebug and my IDE (currently PHPStorm 7) for a while, but I have been noticing that there are certain commands that die whenever I have the dubegger enabled ...
5
votes
2answers
2k views

standalone rsync and ssh work, but drush gets me a “Permission denied (publickey)”

I've got a production site (on shared hosting for now) of which I just want to have backups at this stage. and I've got a backup instance which I want to overwrite with the prod site. This is my /etc/...
5
votes
1answer
467 views

How to download the projects within a distribution using git, not just the distribution itself?

I've set $options['package-handler'] = 'git_drupalorg'; set in my .drushrc.php file. Now when I run drush make for a distribution (in this case, the 7.x-3.x-dev release of Commons), the distribution ...
5
votes
3answers
2k views

Is it possible to change the path of modules/themes installed using an installation profile?

I have a site which has a profile which downloads a number of modules using drush make. It adds the modules in the path /profiles/profile_name/modules. Is it possible in the make file of the profile ...
5
votes
0answers
417 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. ...