It is important to run an eCommerce store and keeping it up to date. There are different ways to upgrade Magento 2 installation. To keep you in the update, Magento avails you to choose any of those ways which suit your need and plan.
3 Ways to Upgrade Magento 2 Installation
- Using a terminal command-line program, Magento Composer.
- Using the Web Setup Wizard Upgrade
- Copy/Paste the latest Magento 2 version
USE MAGENTO COMPOSER
The first and most effective method to upgrade the Magento 2 installation. Then it is relied on using the Magento Composer. Actually the Composer is a dependency manager in PHP. 1. Please ensure that you have logged in as a Super Admin/System owner. Then move to the Magento 2 root foldercd ~ /public_html
2. Using the following command, switch to the Maintenance mode,
php bin/magento maintenance:enable
3. Empty the vendor folder by running the below-mentioned command,
rm -rf vendor/*
4. Now open the composer.json file and choose any of your desired Magento versions.
Note:
It should not be the same as your current version. There is an alternative for you to choose from.
- Execute the Require command to request the Magento 2 package to use Composer.
- Update all the associated files.
composer require <product> <version> —no-update composer update
Example:
If you want to upgrade the current version to Magento 2.3.0 installation. Then the command line should look like as below:
composer require magento/product-community-edition 2.2.4 —no-update composer update5. Enter the access key if you’re asked for it. Then it’s time for the installation of files.
Note:
Here the Username represents the public key. Then the password represents the private key.6. After the successful completion of the installation. It is mandatory to clear var child directories. For this, execute the commands below:
rm -rf <Magento install dir>/var/cache/* rm -rf <Magento install dir>/var/page_cache/* rm -rf <Magento install dir>/var/generation/*Note: Flush all the cache-related options. 7. Use the following query to upgrade the database schema,
php bin/magento setup:upgrade
8. Now you’re all set to get the store back by disabling the Maintenance mode using the command:
php bin/magento maintenance:disable
Read: Common Magento migration issues and their solutions
USE THE SETUP WIZARD IN THE MAGENTO 2 installation(Upgrade)
Using the second method will reduce the time and it is effective than the other two methods. And this method suits those who have only a bit of knowledge in handling Magento 2 composers.
System ⇾ Tools ⇾ Web Setup Wizard.
3. Now click on the System Configuration option.
4. After the whole configuration set to complete. Click Save config and then System Upgrades.
5. After the whole configuration set to complete, Click Save config and then System Upgrades.
Since the Magento 2.x supports various PHP versions. Now you may ask to upgrade the PHP to match with the platform need.
DOWNLOAD THE LATEST VERSION MANUALLY
This is the simplest method to upgrade Magento 2 installation. So even the Magento 2 beginner can handle it.- Download the latest version of Magento from the official Magento website.
- Move the downloaded files to the Magento 2 root folder, then unzip the whole package.
-
Now the Magento calls for replacing the existing files. So go for it without any second thought, click ‘Yes’.
php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento cache:clean php bin/magento indexer:reindexBefore proceeding to the next process. Please ensure that whether every command is over or not. The steps will help you to fix the following tasks, they are:
- Refresh the database schema
- Update all dependencies, and
- Flush caches.
- Check the store frontend and admin view
- Check the workflow and site compatibility
- In case if you use any third-party extension, run some smoke test
FINAL WORD
Yes, you’ve learned to upgrade a Magento 2 store installation using the above methods. (i.e. Via The Setup wizard, Magento Composer, and by uploading files).
Though you have several ways to upgrade the Magento 2 installation. But it is a must carry any Magneto 2 installation process with the help of Magento migration experts.
Related blogs: 1. How coronavirus impact the eCommerce industry/store? 2. Types of data that can be migrated during Magento migration 3. What is the need of migrating Magento 1 to Magento 2? 4. 5 useful tips for successful Magento 2 migration 5. Everything about Magento 2 Store View, Website and Multi-Store





1 Responses
A motivating discussion is definitely worth comment. I believe that you need to write more on this topic, it might not be a taboo matter but typically folks don’t talk about such topics. To the next! Cheers!!