1

The command drush @sites status doesn't do anything.

The full command obtained for the process is:

/usr/bin/php /home/myuser/.config/composer/vendor/drush/drush/drush.php --php=/usr/bin/php --php-options= @sites status

This is my enviroment:

  • Drupal: 8.2.4
  • Drush: 8.1.7

The "drush site-alias" command says me:

  • @site1
  • @none
  • @site2
  • @self
  • default
  • site1
  • site2

I have a setup for Drupal multi-sites with subdirectories, the aliases file is:

~/.drush/aliases.drushrc.php

<?php
/**
 * @file
 * Site alias for all sites
 */
$root = '/var/www/html';

$aliases['site1'] = array(
    'uri' => 'multisite.local/site1',
    'root' => $root,
    'path-aliases' => array(
        '%dump-dir' => '/tmp'
    ),
);
$aliases['site2'] = array(
    'uri' => 'multisite.local/site2',
    'root' => $root,
    'path-aliases' => array(
        '%dump-dir' => '/tmp'
    ),
);

The full output of the drush status command is:

 Drupal version                  :  8.2.4
 Site URI                        :  http://default
 Database driver                 :  mysql
 Database hostname               :  localhost
 Database port                   :  3306
 Database username               :  db_user
 Database name                   :  db_name
 Database                        :  Connected
 Drupal bootstrap                :  Successful
 Drupal user                     :
 Default theme                   :  bootstrap
 Administration theme            :  seven
 PHP executable                  :  /usr/bin/php
 PHP configuration               :  /etc/php.ini
 PHP OS                          :  Linux
 Drush script                    :  /home/myuser/.config/composer/vendor/drush/drush/drush.php
 Drush version                   :  8.1.7
 Drush temp directory            :  /tmp
 Drush configuration             :
 Drush alias files               :  /home/myuser/.drush/aliases.drushrc.php
 Install profile                 :  standard
 Drupal root                     :  /var/www/html
 Drupal Settings File            :  sites/default/settings.php
 Site path                       :  sites/default
 File directory path             :  sites/default/files
 Private file directory path     :  private/default
 Temporary file directory path   :  /tmp
 Sync config path                :  sites/default/files/config_BrLQsjBr6VkcTEyCkzkY-es-hzISWg4d3oV2EEEoqh-UZMLBJWDiDaq78TIWm-lBbVi-aPHISw/sync
2
  • Just to be 100% sure: You are running drush site-alias and drush @sites status in the same directory/inside your Drupal root (/var/www/html)? I just tested on a multisite D7 installation with Drush 8.1.8 and drush @sites status works - the status command is executed for all sites in the multisite.
    – hansfn
    Dec 27, 2016 at 14:22
  • @hansfn Yes it is from the DocumentRoot of Apache and the Drupal root directory(/var/www/html). I left the process running for about 5 minutes, but nothing happened...
    – Lenin Meza
    Dec 27, 2016 at 15:51

1 Answer 1

-1

"@sites" is no longer available with Drush 9. I presume this what is being used with Drupal 8 here.

More information here: https://github.com/drush-ops/drush/issues/3019#issuecomment-334503217

Drush 9 no longer supports executing a single command on multiple sites with alias lists (@A,@b,@c) or @sites. Neither of those syntaxes are available in any context. You may still use drush sa @group to see all aliases in a group; that is the only context in which Drush recognizes alias lists.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.