Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
Generates a command file for PHPstorm CLI integration with Drush.
- Put the
phpstorm.drush.inc
file in your /.drush/ directory (or link it there, which is what I did) - Run
drush generate-phpstorm-commands>drush.commands.xml
(or whatever you want to call the file it generates) - In PhpStorm, do Preferences->Command Line Tool Support
- Add a new entry as a Custom Framework.
- Fill in the Framework Settings with the name and alias you want to call it (I just used 'drush' for both) and the path to drush
- Click Apply
- Now that you have a drush tool, edit it using the pencil icon. You'll see a mostly empty XML file.
- Open the XML file you generated in step 2 in another editor, select all the children elements of
<framework...>
and copy - Paste inside
<framework...></framework>
in the config file in PhpStorm and save
You should now be able to run drush commands from Tools -> Run command... with full hinting, etc.
Thanks to ggroves for writing up these instructions!
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Created by cweagans on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.