Hello, I am trying to install a theme in Magento on my website, after uploading theme files I have to run these two lines in command line
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
I typed them in command line and the output was
could not open input file: bin/magento
How can I solve this issue
Solved! Go to Solution.
could not open input file: bin/magento
Generally this error comes when your bin/magento file is not accessible from the correct location or I would say from the command line console .
So Could you please confirm that , are you running this command from the root directory of magento2 ?
Hello @safaa_alnabhan
Go to the root folder of your Magento project and run the following commands:
sudo chmod 0777 -R bin/magento sudo rm -rf var/cache var/generation var/di sudo php bin/magento setup:upgrade sudo php bin/magento setup:di:compile sudo php bin/magento cache:clean sudo chmod 777 -R var/
This is permission related issue of bin/Magento file.
could not open input file: bin/magento
Generally this error comes when your bin/magento file is not accessible from the correct location or I would say from the command line console .
So Could you please confirm that , are you running this command from the root directory of magento2 ?
Hello @safaa_alnabhan
You have to run these commands where you previously tried to run commands in the terminal panel. (Where you were getting errors.)