The post is researched by Mageplaza’s specialists to guide the user how to upgrade/ update Magento 2 version when using the command line & composer. Let’s take a look at what I am giving you in this document.
Using the following command on
composer require magento/product-community-edition 2.1.1 --no-update composer update rm -rf var/di var/generation php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento indexer:reindex
You should run compile and reindex for better performance after upgrading.
.. Note:: In Ubuntu/Debian Linux, when you meet the permission issues, remember to insert
sudo at the beginning of every command like
sudo composer update.
Next, you can check the Magento 2’s version by running the command.
php bin/magento --version
If the system show the cache write permission error, please add the following command to give write permission to pub and var directories:
chmod -R 777 pub var
That is all things you will use to upgrade/update Magento 2’s version via command line & composer. Thanks for your reading and please comment below if there is any trouble in that.