79179650

Date: 2024-11-12 03:02:36
Score: 1
Natty:
Report link

I was looking for a solution for many days. I searched around the web and tried everything, but nothing worked for me. With a slight difference from @pedro-ferreira answer, here is my solution.

  1. Access Git Bash with administrator permission. It can be any terminal you are using for development. Make sure Git is installed and you are using it with administrator permission. I am using Laragon (Local Development Environment)

  2. Navigate to the installation folder of Drupal and type the following command to install drush: composer require drush/drush:12.*

Please Note! Most of the guides/solultions out there will tell you to install drush globally, but it is not required and it does not work. Latest version of drush as the time of writing is 13, but you should use version 12.

  1. Add the following path to your system environment variables under the PATH variable: path_of_project/vendor/bin/drush.

For example, here is my path. "ugintl" is the drupal project name. C:\laragon\www\ugintl\vendor\bin\drush

  1. Now stop and start your server again and open the terminal/command line. Depending on your Dev Environment, you can access drush using commands ./vendor/bin/drush or php vendor/bin/drush. For me, the later worked.
Reasons:
  • Blacklisted phrase (1): but nothing work
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @pedro-ferreira
  • Low reputation (0.5):
Posted by: Umair