To update Magento 2.1.x to a newer version, say your current Magento installation is version 2.1.2 Community Edition, and you would like to update your Magento to the latest version 2.1.3 Community Edition, then use the following commands. Firstly open up your terminals and execute command as below:
Note: Don't use sudo while using composer for the reasons best explained here: http://bit.ly/2rDTRPk
Same method can be applied for Updating Magento from:
Note: Don't use sudo while using composer for the reasons best explained here: http://bit.ly/2rDTRPk
composer require magento/product-community-edition 2.1.3 --no-update
composer update
rm -rf var/di/* var/generation/*
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
Same method can be applied for Updating Magento from:
- Magento 2.1.3 to Magento 2.1.4
- Magento 2.1.4 to Magento 2.1.5 and so on...