Upgrade Magento 2.1 to 2.2




Upgrade Magento 2.1.7 to Magento 2.2.2


Edit composer.json
"version": "2.1.7" replace with "version": "2.2.2"
"magento/product-community-edition": "2.1.7" replace with "magento/product-community-edition": "2.2.2"
composer update
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
php bin/magento setup:upgrade
Then run following below commands after successful upgrade. It will time taking step.During upgrade some error may occur which need to be fixed.Some errors you will face during upgrade command (php bin/magento setup:upgrade) while most of the issues during compile command (php bin/magento setup:di:compile) .
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
chmod -R 777 generated
chmod -R 777 var/cache
chmod -R 777 pub
Most of the custom module work fine. Some may need updated one from the extension provider. Contact extension provider for the same. Themes may need some xml fixes. 

7 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hello Ahmad,

    Are custom modules working fine after up-gradation?
    If not, What we need to do to use custom as well as purchased extensions configured in 2.1.5 to 2.2.5?
    Please let me know, if need to follow any other steps other than above in my scenario.

    Best Regards,
    Nitesh Kuyate

    ReplyDelete
    Replies
    1. Hi Nitesh,
      Most of the custom module work fine. Some may need updated one. Contact extension provider for the same. Themes may need some xml fixes.
      I suggest you proceed with it.
      Some errors you will face during upgrade command (php bin/magento setup:upgrade) while most of the issues during compile command (php bin/magento setup:di:compile) . Temporarily remove the module if you face issue. After upgrade install the latest one. Do contact if stuck somewhere.
      Thanks
      Ahmad Vaqas Khan

      Delete
    2. Hi Ahmad,

      Thanks for quick reply.

      Best Regards,
      Nitesh Kuyate

      Delete
    3. Hi Ahmad,

      Just want to confirm,
      Is existing data like orders, customers, products etc preserved?

      Best Regards,
      Nitesh Kuyate

      Delete
    4. Hi Nitesh,
      Yes. Dont worry for it. Orders, Customers, Products, Attributes, Rules, Shipping, Customer Group, System Configuration, everything is remains the same.
      May need upgrade or changes in custom module only.
      Thanks,
      Ahmad

      Delete
    5. But always keep a backup of code and Database before upgrade of site.

      Delete

Buy/Sell Source Code of Website,Apps,Softwares

Install sample data in magento 2