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.

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.

Leave a Comment

(4 Comments)

  • Rakesh Gupta

    I followed your instructions to update my Magento 2.2.6 to 2.3 but it failed at command > composer update

    Following is the error I’m getting :

    globltec@sg06 [NEW ~/public_html]# composer update
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.

    Problem 1
    – Installation request for magento/product-community-edition 2.3.0 -> satisf iable by magento/product-community-edition[2.3.0].
    – magento/product-community-edition 2.3.0 requires msp/recaptcha ^2.0.1 -> s atisfiable by msp/recaptcha[2.0.1, 2.0.2] but these conflict with your requireme nts or minimum-stability.

    globltec@sg06 [NEW ~/public_html]# ^C
    globltec@sg06 [NEW ~/public_html]#

    • Chirag

      Please try to disable msp/recaptcha module and check

      • Rakesh Gupta

        Tried your suggestion :

        globltec@sg06 [NEW ~/public_html]# php bin/magento msp:security:recaptcha:disable
        globltec@sg06 [NEW ~/public_html]# composer update
        Loading composer repositories with package information
        Updating dependencies (including require-dev)
        Your requirements could not be resolved to an installable set of packages.

        Problem 1
        – Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
        – magento/product-community-edition 2.3.0 requires msp/recaptcha ^2.0.1 -> satisfiable by msp/recaptcha[2.0.1, 2.0.2] but these conflict with your requirements or minimum-stability.

        globltec@sg06 [NEW ~/public_html]#

        But still getting same problem/error.

  • Alex

    Thanks! It helped a lot.

  • All the comments are goes into moderation before approval. Please do not spam. Your email address will not be published. Required fields are marked *

    Enjoy this post? Please support Us!

    Like our social page for daily new updates….


    Want to become
    a Magento 2 Expert?

    If Yes! Then Subscribe to our newsletter and get weekly article to you email id.
    Subscribe Here
    SUBSCRIBE NOW
    close-link

    To Avoid Spam Downloads, We Want Your Email

    We will send you download link right
    away. Please submit form below.
    SEND ME DOWNLOAD LINK
    Close