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

Ecommerce Shipping Strategies - Website Options
E-commerce
David Pratt

Ecommerce Shipping Strategies

Ecommerce Shipping Strategies are an important thing to consider when running an ecommerce business. It can mean the difference between a conversion and an abandoned basket.
Read More »
E-commerce
DTF Digital

Temu eCommerce

Temu eCommerce has seen rapid growth recently, but will it fly or fail? Will the temptation of low cost goods direct from the manufacturer in China win over ethical considerations of low cost labour and carbon footprint?
Read More »
DTF Digital