I have tried some ways to create an alias for my local Drupal project

https://www.drupal.org/node/1401522 https://www.drupal.org/project/drush/issues/831272 https://www.drupal.org/project/drush/issues/786766

I can connect with this command

drush --root=C:/wamp64/www/executive-coatings --uri=http://localhost:81/executive-coatings status

The output will be like this.

 Drupal version   : 8.6.13
 Site URI         : http://localhost:81/executive-coatings
 DB driver        : mysql
 DB hostname      : localhost
 DB port          : 3306
 DB username      : root
 DB name          : dev_ecc_new
 Database         : Connected
 Drupal bootstrap : Successful
 Default theme    : ecc_front
 Admin theme      : adminimal_theme
 PHP binary       : C:\wamp64\bin\php\php7.2.10\php.exe
 PHP config       : C:\wamp64\bin\php\php7.2.10\php.ini
 PHP OS           : WINNT
 Drush script     : C:\wamp64\www\executive-coatings\vendor\bin\drush.phar
 Drush version    : 9.6.2
 Drush temp       : C:\Users\k\AppData\Local\Temp
 Drush configs    : C:/Users/k/.drush/drush.yml
 Install profile  : minimal
 Drupal root      : C:\wamp64\www\executive-coatings
 Site path        : sites/default
 Files, Public    : sites/default/files
 Files, Temp      : /tmp

But when I try to create an alias it not work my alias file has this code

$aliases['local'] = array(
      'uri' => 'localhost:81/executive-coatings',
      'root' => 'C:/wamp64/www/executive-coatings',
  'path-aliases' => array(
    '%dump-dir' => '/tmp',

I try with this drush @local status that return this [preflight] The alias @local could not be found. I think I put my alias file in the wrong directory, can you provide the correct path?

  • According to this alias should be in your drush folder named like [your-site.]aliases.drushrc.php – berramou Apr 9 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.