3 Ways to Upgrade Magento 2 Installation

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

3 ways-to-upgrade-magento-2-store installation

  1. Using a terminal command-line program, Magento Composer.
  2. Using the Web Setup Wizard Upgrade
  3. Copy/Paste the latest Magento 2 version


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 folder

cd ~ /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.

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

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 update

5. Enter the access key if you’re asked for it. Then it’s time for the installation of files.

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/*


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


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.

1. Open and access to your store admin as the Super-Admin.

2. Then navigate from Admin panel:

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. 


It is better to back up files and skip the backup step suggested by the wizard. So then if it fails and you’ll have to start the process once again.

Read: Magento 2 migration – The development process 


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’.

Then run the following commands in SSH console one by one,

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

php bin/magento cache:clean

php bin/magento indexer:reindex

Before 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. 


The store with a lot of products and customers may take some extra time until each command is executed.

Thus, the upgrading process is almost complete. Now test your site against the following check-list for the betterment of the store. 

  • 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

Read: What are the steps involved in the Magento migration plan?


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.


One response to “3 Ways to Upgrade Magento 2 Installation”

  1. Reanna Ninos Avatar
    Reanna Ninos

    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!!

Leave a Reply

Your email address will not be published. Required fields are marked *