When our Magento 2 on live server and we require to enable disable modules, flush cache , deploy static files etc ,we need to configure SSH.

but now not connect my putty so how to run all command


1. Create a file in your Root 'commands.php', add commands you want to run in system() function in php file.

2. Run it by URL like : your-site-url/commands.php

   system('php bin/magento cache:flush'); // for cache flush 
   system('php bin/magento setup:upgrade'); // for setup upgrade
   system('php bin/magento setup:static-content:deploy'); // for static content deploy

You can create simple "test.php" in your root directory and put the code as mentioned in below post.

How to install module magento 2 don't need run command line bin/magento setup:upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.