[success] No site aliases found. drush 9
Running drush sa returns below message in drush 9?
[success] No site aliases found.
Here is the solution:
NOTE: Tested with drush installed globally
Run drush debug command:
sastha@DESKTOP $ drush st --debug -vvv
[preflight] Config paths: /home/sastha/.composer/vendor/drush/drush/drush.yml
[preflight] Alias paths: /home/sastha/sites
[preflight] Commandfile search paths: /home/sastha/.composer/vendor/drush/drush/src
[bootstrap] Starting bootstrap to max [1.47 sec, 7.64 MB]
[debug] Trying to bootstrap as far as we can [1.48 sec, 7.65 MB]
PHP binary : /usr/bin/php7.2
PHP config : /etc/php/7.2/cli/php.ini
PHP OS : Linux
Drush script : /home/sastha/.composer/vendor/drush/drush/drush
Drush version : 9.6.0
Drush temp : /tmp
Drush configs : /home/sastha/.composer/vendor/drush/drush/drush.yml
Running drush sa returns below message in drush 9?
[success] No site aliases found.
Here is the solution:
NOTE: Tested with drush installed globally
Run drush debug command:
drush st --debug -vvvSample output from above:
[preflight] Config paths: /home/sastha/.composer/vendor/drush/drush/drush.yml
[preflight] Alias paths:
[preflight] Commandfile search paths: /home/sastha/.composer/vendor/drush/drush/src
[bootstrap] Starting bootstrap to max [0.3 sec, 7.64 MB]
[debug] Trying to bootstrap as far as we can [0.3 sec, 7.64 MB]
PHP binary : /usr/bin/php7.2
PHP config : /etc/php/7.2/cli/php.ini
PHP OS : Linux
Drush script : /home/sastha/.composer/vendor/drush/drush/drush
Drush version : 9.6.0
Drush temp : /tmp
Drush configs : /home/sastha/.composer/vendor/drush/drush/drush.yml
Alias Path is missing as highlighted above
Add alias path in your main drush.yml. Refer https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml
Sample drush.yml content:
sastha@DESKTOP $ cat /home/sastha/.composer/vendor/drush/drush/drush.yml
#This is a Drush config file. Sites may override this config to change minimum PHP.
drush:
php:
minimum-version: 5.6.0
paths:
alias-path:
- /home/sastha/sites
#This is a Drush config file. Sites may override this config to change minimum PHP.
drush:
php:
minimum-version: 5.6.0
paths:
alias-path:
- /home/sastha/sites
Check if alias-path is set?
[preflight] Config paths: /home/sastha/.composer/vendor/drush/drush/drush.yml
[preflight] Alias paths: /home/sastha/sites
[preflight] Commandfile search paths: /home/sastha/.composer/vendor/drush/drush/src
[bootstrap] Starting bootstrap to max [1.47 sec, 7.64 MB]
[debug] Trying to bootstrap as far as we can [1.48 sec, 7.65 MB]
PHP binary : /usr/bin/php7.2
PHP config : /etc/php/7.2/cli/php.ini
PHP OS : Linux
Drush script : /home/sastha/.composer/vendor/drush/drush/drush
Drush version : 9.6.0
Drush temp : /tmp
Drush configs : /home/sastha/.composer/vendor/drush/drush/drush.yml
Problem solved!
Yes formatting is bad because no one is reading my blog except me :) :) :)
1 comment:
This was super helpful, thank you!
Post a Comment