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 that does not consist of typing my 300 alias in a config file ?
Waiting something similar, I wrote this small script I called "drall" you may adapt:

#!/usr/bin/php
&lt;?php

// Path to sites.php file.
include('web/sites/sites.php');

$done = [];
$argv = $_SERVER['argv'];

array_shift($_SERVER['argv']);

$parameters     = implode(' ', $_SERVER['argv']);
$commandPattern = "drush --uri=:key $parameters";

foreach ($sites as $key =&gt; $site) {

  if (count($argv) &gt; 1 &amp;&amp; !in_array($site, $done)) {

    $command = str_replace(':key', $key, $commandPattern);
    echo "Executing command `$command` on $site\n";
    `$command`;
    $done[] = $site;
  }
}


Use example:

$ ./drall cc render
Executing command `drush --uri=xxxxxxx cc render` on default
 [success] 'render' cache was cleared.


Hope there will be some @sites behaviors later, that was helpfull.

Although from this issue it doesn't look like it:


  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.