Plesk: Shopware-CLI-Commands – Error: php command not found
You try to execute CLI commands within your SSH environment, e.g. for Shopware, but the commands do not work and you get the error message:
-bash: php: command not found
This error occurs when php is not shared with the users by default, so you have to specify the path to the php executable file instead of the command.
For Plesk this is usually the path:
/opt/plesk/php/7.4/bin/php
Of course, the Shopware PHP executable file must also be specified with the correct path after a login, for example Plesk by default puts the files in the httpdocs subfolder, the full command would then look something like this:
/opt/plesk/php/7.4/bin/php httpdocs/bin/console