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.
- The option to Upgrade via Wizard is in the backend under a menu option
System > Toolscalled
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/ with your backend url in the browser url input and hit enter.
You can use it to install extensions from the Magento Marketplace but also to Upgrade Magento 2.
(Optional) If you have never used the Magento Marketplace before you will be required to add the Marketplace credentials in the
System configpage. Credentials can be obtained from Marketplace »
Public Access Key,
Private Access Key and Click
System Upgrade in the left tab.
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
SSH into the server and go to
Execute below commands in
$ composer require magento/product-community-edition 2.0.5 --no-update $ composer update $ rm -rf var/di var/generation $ bin/magento cache:flush $ bin/magento setup:upgrade $ bin/magento setup:di:compile $ bin/magento indexer:reindex
- Replace “2.0.5” in the first line
composer require magento/product-community-edition 2.0.5 --no-updatewith 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:
$ bin/magento --version
This will show you the version:
Magento CLI 2.3.0
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.
- Download latest Magento 2 from Magento Tech Resources »
- Unzip the archive in your Magento root folder by overwriting all current folder files.
$ bin/magento setup:upgradevia 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.