You are here

drush site aliases

Submitted by Alan Mels on Thu, 11/03/2022 - 21:32
  1. drush site:alias
  2. '@live.live':
  3. paths:
  4. modules: modules
  5. theme: themes/herc
  6. root: /home/hest/public_html/web
  7. uri: /www.herculesindustries.com
  8. options:
  9. command-specific:
  10. sql-sync:
  11. sanitize: true
  12. no-ordered-dump: true
  13. structure-tables:
  14. common:
  15. - cache
  16. - cache_filter
  17. - cache_menu
  18. - cache_page
  19. - history
  20. - sessions
  21. - watchdog
  22. source-command-specific:
  23. sql-sync:
  24. no-cache: true
  25. structure-tables-key: common
  26. '@stage.stage':
  27. paths:
  28. modules: modules
  29. theme: themes/herc
  30. root: /home/herc/public_html/web
  31. uri: herc.altagrade.com

0) Alias files are located in /etc/drush/sites/

l /etc/drush/sites/
total 8
drwxr-xr-x 2 root root  49 Nov  3 21:02 .
drwxr-xr-x 3 root root  19 Nov  3 21:00 ..
-rw-r--r-- 1 root root 545 Nov  3 21:02 live.site.yml
-rw-r--r-- 1 root root 121 Nov  3 21:02 stage.site.yml

1) Drush config file are located in /home/herc/public_html/vendor/drush/drush/drush.yml and /home/hest/public_html/vendor/drush/drush/drush.yml

cat /home/herc/public_html/vendor/drush/drush/drush.yml
#This is a Drush config file. Sites may override this config to change minimum PHP.
drush:
  php:
    minimum-version: 7.1.3
  paths:
    alias-path:
      - '${env.HOME}/.drush/sites'
      - /etc/drush/sites
 
options:
  # Specify the base_url that should be used when generating links.
  # Not recommended if you have more than one Drupal site on your system.
  uri: 'https://herc.altagrade.net'