How to upgrade Magento 2.2 to Magento 2.3 version?

Upgrade Magento 2.1.* or 2.2.* Version to Latest 2.3.4 Version for site speed and security improvement, You need to follow all the steps given in the articles.

Magento 2.3 Upgrade is a little bit tricky. You can’t just upgrade using only changes in magento/product-community-edition and version line from the composer.json file.

Upgrade using the command line Magento 2.3,

  • Prerequisites:
    You must have PHP 7.2 installed for Magento 2.3 (PHP 7.1.3+ is also supported)

First Take all the processes in staging server before going to live, so you can assure the status of the latest version is working fine in your staging server.

For Upgrade Magento to latest Magento 2.3 version, follow below steps;

— Backup the existing composer.json file from a root in the Magento installation directory.

Run from Command line below commands,

1.  First Command

composer require magento/product-community-edition=2.3.4 --no-update

2.  Second Command

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

3. Update autoload from composer.json

Open composer.json and edit the “autoload“: “psr-4” section to add new dependency after “Magento\\”: “app/code/Magento/” line.

“Zend\\Mvc\\Controller\\”: “setup/src/Zend/Mvc/Controller/”

Your new composer.json look like below now,

"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/"
    },
    ....
}

4. Final Command,

 composer update

After running the above command, Takes some time to upload new extensions and packages. wait for around 10 minutes.

Once Successfully updated to Magento 2.3 you need to run below command to register the new module in Magento.

Run from Magento Root Instance,

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento cache:flush

Now you can check the backend of your site, You got a new version installed.
You can see your version from the backend at the right bottom side with status like Magento version 2.3.4

You can check the new feature of Magento 2.3 from the link, Latest Feature of Magento 2.3

After upgrade from older to latest version 2.3, you have default all the Multi-Store Inventory(MSI) modules are disabled. If you want to use the MSI feature for your site you need to enable all the inventory module from app/etc/config.php file manually and after enable you to need to run upgrade command.

To enable all the Multistore Inventory Module, You need to run below commands from the root path of your Magento instance,

php bin/magento module:enable --clear-static-content Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryIndexer Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventoryCache Magento_InventorySalesAdminUi Magento_InventorySalesApi Magento_InventorySalesFrontendUi Magento_InventoryShipping Magento_Shipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryShippingAdminUi

This is the step to accomplish Magento Version upgrade.