cancel
Showing results for 
Search instead for 
Did you mean: 

upgrade Magento

SOLVED

upgrade Magento

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: upgrade Magento

Hi @safaa_alnabhan

 

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 ?

 

 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

4 REPLIES 4

Re: upgrade Magento

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. 

Manish Mittal
https://www.manishmittal.com/

Re: upgrade Magento

Hi @safaa_alnabhan

 

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 ?

 

 

if issue solved,Click Kudos & Accept as Solution

Re: upgrade Magento

Hello, Actually I don't know what is the root directory
I open cpanel then go to file manager then open public_html folder
.. inside public_html folder I find bin folder then magento file

I tried to run this line
php public_html/bin/magento
but it gives me the same output

Re: upgrade Magento

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.)

Manish Mittal
https://www.manishmittal.com/