Magento 2 Upgrade

The guide to upgrade Magento 2 stores using Composer, Wizard or Manually and how to handle Errors during the process.

Ways to Upgrade Magento 2 Installation #

Different approaches can be take to update a Magento 2 installation. Below are 3 methods you can use to get your Magento 2 store to the latest version available.

Upgrade Wizard #

Upgrade Magento 2 using the Web Setup Wizard provided by Magento in backend. This is the simplest option and less technical as you only needed to login into your Magento 2 Admin area and use a GUI.

  1. The option to Upgrade via Wizard is in the backend under a menu option System > Tools called Web Setup Wizard.

If you don’t see such a option don’t worry, there is a bug that hides the option, you can directly access it via:

http://www.example.com/admin_xxxx/admin/backendapp/redirect/app/setup/

Replace http://www.example.com/admin_xxxx/ with your backend url in the browser url input and hit enter.

Web Setup Wizard

You can use it to install extensions from the Magento Marketplace but also to Upgrade Magento 2.

  1. Select System Upgrade

  2. (Optional) If you have never used the Magento Marketplace before you will be required to add the Marketplace credentials in the System config page. Credentials can be obtained from Marketplace

System config for Marketplace

Enter Public Access Key, Private Access Key and Click Save Config.

Click on System Upgrade in the left tab.

In the Step 1: Select Version area Magento wizard will now look for available versions and the Magento Core Components select will offer a version to upgrade to.

After selecting a version form Magento Core Components click on Next in the top part of the screen.

Upgrade Composer #

Upgrade Magento 2 using Composer

  1. SSH into the server and go to wwwroot folder.

  2. Execute below commands in wwwroot folder

    composer require magento/product-community-edition 2.0.5 --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
    
  • Replace “2.0.5” in the first line composer require magento/product-community-edition 2.0.5 --no-update with the latest version number, you can get this on the Magento 2 Releases GitHub page.

After executing commands above you can check the Magento 2 version is upgraded via command line:

php bin/magento --version

This will show you the version:

Magento CLI 2.3.0

where 2.3.0 is the latest version installed

Upgrade Manually #

Upgrade Magento 2 by manual copy/paste from a newer version if the other 2 above fail.

  1. Download latest Magento 2 from Magento Tech Resources
  2. Unzip the archive in your Magento root folder by overwriteing all files.
  3. Run php bin/magento setup:upgrade via SSH

Upgrade Errors #

Errors can appear during a Magento 2 Upgrade on all 3 methods above.

Readiness Check #

This is a important step in the Upgrade Wizard process. If it fails a message will be displayed Error! You need to resolve these issues to continue.

This step does a check of :

  • Updater Application Availability
  • Cron Scripts
  • PHP Settings
  • PHP Extensions Check

On each of these checks there is a link to the Magento Docs on why they might fail that you can follow.

How to fix Magento 2 errors that appear during a upgrade #

Need help with Magento 2 Upgrade ?