Loading...


Related Products


Date Published: March 15, 2022

Unable to run drush php command on Drupal 7 site

Issue

When attempting to run selected drush php commands on Drupal 7 site the command errors. 

Example

/var/www/html/[sitename.env]/docroot$ drush php
Symfony\Component\Console\Exception\InvalidArgumentException: Command name "" is invalid. in [error]
...

Resolution

Use the drush7 executable to run the commands successfully against your Drupal 7 site, this is because drush8 is the default drush used.

Example

/var/www/html/[sitename.env]/docroot$ drush7 php
[1] [sitename.env]> exit;

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation