If you don’t run php 7 by default in Plesk (which is often the case), you will struggle to use many of the SSH/command line commands.

Typically you’d navigate to your magento folder and run one of the following:

php bin/magento cache:flush

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

Fortunately this is simple enough to resolve and just involves telling the php command which version of the PHP bin it should look at.

By adding: export PATH=/opt/plesk/php/7.0/bin:$path; prior to your command you can get PHP to use the correct version.

So, your new commands would be:

export PATH=/opt/plesk/php/7.0/bin:$path; php bin/magento cache:flush
export PATH=/opt/plesk/php/7.0/bin:$path; php bin/magento setup:static-content:deploy
export PATH=/opt/plesk/php/7.0/bin:$path; php bin/magento indexer:reindex

DTF Digital