I have an issue to install Magento theme extension using -jailshell-4.2$

I used to be use command line php bin/magento setup:upgrade

And now the "TERMINAL" on my mac doesn't work properly as before.

enter image description here

Does anyone know what command line should I typing?

Thank you

  • 'sudo rm -rf var/cache/* var/di/* var/generation/* var/page_cache/* var/view_preprocessed/* pub/static/frontend/*' 'sudo rm -rf pub/static/adminhtml/*' 'sudo chmod -R 0777 pub var generated' run these command and then try yours – Ketan Borada Feb 26 '19 at 11:10
  1. Clear cache and delete generated folder then try again.
  2. Check if you have magento file in bin directory
  3. If vendor folder is not in .gitignore file then check if some file are missing from core by 'git status'.
  4. You can download the folder manually and place it in root folder of magento then can use setup:upgrade, static-content:deploy, cache:clear, cache:flush.
| improve this answer | |

try :

php ./public_html/bin/magento setup:upgrade
| improve this answer | |

Maybe you just need to move in your project root folder first.

In my case that is /var/www/html. It can't find command because you are not pointing to it by bin/magento, you need to tell it where magento is. So in my case/var/www/html/bin/magento.

| improve this answer | |

Please follow this step to run Magento 2 cli command

$ cd public_html
$ php bin/magento setup:upgrade
| improve this answer | |
  • For example my project on "public_html/abc.com/ then write "cd public_html/abc.com/" – Birjitsinh Zala Feb 26 '19 at 12:59

Check permission first and ownership.

make sure you are on the project root folder or inside bin/magento (remove bin/magento form commands than)

sudo chown www-data:www-data  -R *
sudo rm -rf var/ 
sudo rm -rf pub/static
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:flush
| improve this answer | |

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.