In this article, I will explain how to upgrade your Magento version from Magento 2.0.x to Magento 2.1 using Command-Line Interface (CLI). Please keep in mind that this upgrade supports a fresh installation of Magento 2, so it is not recommended to apply this method on your live store. After the upgrade, you can migrate your data from old Magento 2 store to newly upgraded Magento 2.1 & 2.2 store.
Step 1: Access Your Server via SSH
You need to connect your server via SSH.
Step 2: Navigate to the Magento 2 Root Directory
Once your SSH connection is up, you will need to move to your target application folder. In that application folder, you will find the public_html folder which is the root directory of Magento 2.
Step 3: Upgrade Commands
Please follow the same order and use the commands listed below:
composer require magento/product-community-edition 2.1.0 --no-update
Note: As 2.1.0 is the latest version, these numbers can be changed accordingly. You can also Upgrade Magento 2.1 to 2.2 using the same process. you just need to change the version 2.2.X.
Note: It will ask for repo.magento.com authentication keys. For more information, visit this link.
- rm -rf var/di var/generation
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento cache:clean
- php bin/magento cache:flush
- php bin/magento indexer:reindex
Thanks for reading my blog. I hope it will help you, Please leave your comments here if it’s really help you.☺