How to Upgrade Your Store to Magento 2.3

Before going to Magento 2.3 Update, We recommend you to go through system requirements for this release as it may require you to make some changes to your server setup.

Step 1: Enable Developer Mode

To enable developer mode, simply use the following command.

php bin/magento deploy:mode:set developer

Step 2: Upgrade to Magento 2.3.0

Next, you have to upgrade to the latest version through the following command:

composer require magento/product-community-edition 2.3.0 –no-update

Step 3: Update Composer

Now, update Composer by running the following command:

composer update

During the update, the required resources for Magento 2.3 will be downloaded and installed.

Fix the Error in Magento 2.3.0

It is possible that during the upgrade, you might face an error. If this is not the case with you, skip to the Step 4.

This error occurs because Magento doesn’t allow the update for composer.json.  As a result, an error is thrown when you try to automatically upgrade the Magento version. So, for Magento 2.3 release, you have to make a few changes to upgrade to the latest version.

In a nutshell, use the following commands to upgrade to Magento 2.3.0.

composer config preferred-install dist
composer config sort-packages true
composer config prefer-stable true

Now, let’s fix the composer.json file in Magento.

composer require –dev friendsofphp/php-cs-fixer:~2.10.0 –no-update

composer require –dev sebastian/phpcpd:~3.0.0 –no-update

php -r ‘$autoload=json_decode(file_get_contents(“composer.json”), true); $autoload[“autoload”][“psr-4”][“Zend\\Mvc\\Controller\\”]= “setup/src/Zend/Mvc/Controller/”; file_put_contents(“composer.json”, json_encode($autoload, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));’

Now go back to Step 2 to start the process again and hopefully, no more errors will occur during the installation process.

Step 4: Run the Upgrade Command

php bin/magento setup:upgrade

After the successful upgrade to Magento 2.3, login to Magento admin panel and explore the latest features.

About Ejaz Alam

A Software Engineer who Believes in a simple lifestyle and follow a simple logic to make himself better than yesterday. :)

View all posts by Ejaz Alam →

Leave a Reply

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