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 Feb 26, 2019 at 11:10

6 Answers 6


try :

php ./public_html/bin/magento setup:upgrade
  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.

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.


Please follow this step to run Magento 2 cli command

$ cd public_html
$ php bin/magento setup:upgrade
  • For example my project on "public_html/abc.com/ then write "cd public_html/abc.com/" Feb 26, 2019 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

Maybe you just need to run:

composer install

In the root magento folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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