• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Resolved Cannot verify Drupal drush install or invoke drush commands

PeterK900

Basic Pleskian
Server operating system version
AlmaLinux9
Plesk version and microupdate number
Plesk Obsidian 18.074 Update #3
I have successfully installed drush and re-run the install to check all is still good,,,

[root@716881 d10314a]# /opt/plesk/php/8.4/bin/php /usr/lib64/plesk-9.0/composer.phar require drush/dru
sh
Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details
Continue as root/super user [yes]? yes
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 17 security vulnerability advisories affecting 2 packages.
Run "composer audit" for a full list of advisories.
Using version ^13.6 for drush/drush

However when I run code to display the version, I get an error...
[root@716881 d10314a]# ./vendor/bin/drush --version
/usr/bin/env: ‘php’: No such file or directory

And when I the Drush command to rebuild the Drupal cache I get the same error...
[root@716881 d10314a]# ./vendor/bin/drush cr
/usr/bin/env: ‘php’: No such file or directory

All these commands (version display and cache rebuilt) work on an identical Drush install on the cPanel platform.

What am I doing wrong? Thanks for any help on this.
 
Hello @PeterK900

In general, I would like to note that drush is not officially supported by Plesk.

However, this looks like an issue related to the missing PHP by OS vendor. You have installed drush by using a specific Plesk PHP, but the utility itself tries to use the PHP that is available directly from the OS.
I would suggest trying to install it and checking again.

Or you might just set the used PHP version over a symlink:
Bash:
ln -s /opt/plesk/php/8.4/bin/php /usr/bin/php

Anyway, it should be done at your own risk.
 
Brilliant Mikhail. Thanks. As you say, running ln -s /opt/plesk/php/8.4/bin/php /usr/bin/php solves the problem. So the command below rebuilds the drupal cache...
[root@716881 d10314a]# ./vendor/bin/drush cr
[success] Cache rebuild complete.

Thank you again for sorting this problem.
.
 
Back
Top