How to Upgrade Magento Version from 2.2.x to 2.3.0?
After a long wait, Magento version 2.3.0 is finally available for the community. You can download Magento version 2.3.0 from the official Magento Website. Many developers have already started upgrading their stores. However, some of the developers are looking for step by step guide on how to upgrade Magento version from 2.2.x to 2.3.0. In this article we, will show you step by step how to upgrade Magento version from 2.2.x to 2.3.0 .
Preparing Your Site for Upgrade
First thing one should always do before upgrading is to backup Magento 2 site. You can take a Magento 2 site files and database backup using Magento 2 admin panel. Go to Magento 2 admin > System > Tools > Backups and take backup.
After that please upgrade your PHP version to PHP 7.2 or PHP 7.1.3+ as Magento 2.3 no more support PHP version lower than 7.1.3
Also please check the composer is pointing to the same PHP version by running below command.
composer -vvv about
Upgrade Magento version from 2.2.x to 2.3.0
After taking backup, follow below steps to upgrade your Magento 2 site version from 2.2.x to 2.3.0
Step 1: Update composer.json file. Navigate to your Magento 2 installation root path and run below command
composer require magento/product-community-edition=2.3.0 --no-update
Step 2: Run below command to add additional packages to composer.json file.
composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update
Step 3: Remove unused packages from composer.json file.
composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update
Step 4: Open composer.json file to add “Zend\\Mvc\\Controller\\”: “setup/src/Zend/Mvc/Controller/”: around line 47 under psr-4 section.
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
},
...
}
Step 5: Run below command
composer update
This command will take some time to finish and it will actually download all the required packages and upgrade your website. After this command finish, run below commands
Step 6: Clear cache and regenerate code.
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f
That’s all. You have successfully upgrade your Magento version from 2.2.x to 2.3.0
Remember, One should always upgrade Magento 2 website to it’s latest version to make your store bug free. Hope this article will help you.
Getting error while upgrade? Please leave us a comment below.

