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

E-commerce
David Pratt

Everything you need to know about Shopify

Shopify is one of the most powerful eCommerce platforms available, but getting started can be more complex than it first appears. While it offers a user-friendly interface, there’s a lot to consider, from choosing the right pricing plan and setting up your store structure to configuring payment gateways, taxes, and shipping settings. Find out more…
Read More »
Shopify Domain Change
E-commerce
David Pratt

How To Add Domain To Shopify Store

Connecting a custom domain enhances your brand and builds trust with customers. This guide walks you through adding a domain to Shopify, including step-by-step instructions for GoDaddy and Cloudflare domains. Get your store online with a professional URL today
Read More »
DTF Digital