Hello,
I am trying to upgrade my Magento 2 version from 2.2.3 to 2.2.4 or 2.2.5
Both do not seem to work when I follow the devdocs and upgrade via command line Composer.
After upgrading everything I get the following results in my SSH.
File doesn't exist: bin/magento
Check "chmod" section in composer.json of magento/magento2-base package.
The upgrade seems to empty some folders like the bin folder. I have found that I am not the only one with this issue but I cannot seem to find a solution, can someone help?
Solved! Go to Solution.
Hi,
I managed to solve the issue by first running the command:
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; && chmod u+x bin/magento
It must have been a permission issue.
I would suggest you to follow exact below steps / Run below commands from command line (SSH) to update your magento 2 version.
composer require magento/product-community-edition 2.2.4 --no-update composer update rm -rf var/di generated php bin/magento cache:clean php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento indexer:reindex
It will upgrade your Magento 2 version.
Hope it helps !
Hello, @Manthan Dave
Thanks for your suggestion, I am afraid this does not work because after "composer update" I get the error (File doesn't exist: bin/magento
Check "chmod" section in composer.json of magento/magento2-base package)
So no php bin/magento commands can be executed.
Well , its different problem if your command is not working then i think something is broken in your magento setup !
Here i would suggest you to manually download the latest version of magento ( Magento 2.2.5) - then replace with your existing source code ( Except app/code and app/design) directories !
Also take a backup of env.php and config.php while replacing full latest source code of magento with existing source code of magento !
Then try , your command will start functioning.
Hope it helps
Hi,
I managed to solve the issue by first running the command:
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; && chmod u+x bin/magento
It must have been a permission issue.
Glad to know that you have resolved your issue and shared the details , yes sometimes due to permission issue it happens !
Happy to help and keep helping