Directadmin – install Drush locally – drush: command not found

This is how you can install Drush locally and make drush command localy on specific user.

  • First go to root directory of user and login with this user
    [root@da ~]# cd /home/mydrush/
    [root@da mydrush]# su mydrush
  • Install drush via composer
    [mydrush@da mydrush]$ composer require drush/drush
    Using version ^10.4 for drush/drush
    ./composer.json has been created
    Running composer update drush/drush
    Loading composer repositories with package information
    Updating dependencies
    ...
  • Create alias to drush for this user. Open file .bashrc and add line bellow to it and save. Then run source.
    # User specific environment and startup programs
    export PATH="$HOME/vendor/bin:$PATH"
    
    [mydrush@da mydrush]$ source .bashrc
    
  • This is it
    [mydrush@da mydrush]$ drush version
    Drush version : 10.4.3

Special thanks to Adrian

Got Something To Say:

Your email address will not be published. Required fields are marked *

*

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 geegkytuts.net
Hosted by SIEL


About author