13

I wanted to know is it possible to update Magento from 2.1.7 to 2.2 ? Or what is a solution to update all Magento 2.1.7 stores to Magento 2.2 ? If we will update it then what are the challenges for that we have to be prepared?

Please let me know is there any solution for this or not.

  • 1
    I dont think upgrade is available for 2.2 now though it can be possible in future. You can view this: magento.stackexchange.com/q/192522/29175 for details on this. – Jai Sep 13 '17 at 4:40
  • Currently, it's not available for 2.2. I have just received an email from Magento that: We expect the final release will be published in the next few weeks from now(Wed Sep 13, 2017). – Khoa TruongDinh Sep 13 '17 at 4:45
  • @KhoaTruongDinh Yes But as we should be prepared earlier. as magento team have already mentioned that they have completed development form magneot2.2 now they will test and improve it. so we should be prepared for it. so i am curious to know about it. – Dhaval Solanki Sep 13 '17 at 4:49
  • @Jai Yes I already checked that thanks. But I am finding way if its possible to upgrade or not. so based on that we can plan our projects. – Dhaval Solanki Sep 13 '17 at 4:50
  • 1
    Did anyone upgraded to 2.2.x and it working fine? I didnt try but want to use latest 2.2.x if there is no issues in it. I hope magento team will stick to it now, not expecting 2.3 or 2.4 ...lol – Jai Nov 23 '17 at 12:37
16

Below is how I upgraded from 2.1.9 to 2.2.0 :

bin/magento maintenance:enable
composer require magento/product-community-edition 2.2.0 --no-update
composer update
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
chmod +x bin/magento
bin/magento setup:upgrade
bin/magento maintenance:disable

For further upgrades, change the version number:

composer require magento/product-community-edition 2.2.4 --no-update
  • magento 2.x no longer has var/generation/ directory. Use rm -rf var/generation instead – Luke May 15 '18 at 12:51
  • 1
    Do we need to upgrade versions one by one or is it normal to upgrade to the recent one directly. For example from 2.2.2 to 2.2.5. Should I upgrade gradually to 2.2.3 then 2.2.4 and finally to 2.2.5? Thank you in advance. – Mohammed Joraid Jun 28 '18 at 6:52
  • Are custom modules working fine after up-gradation? – Nitesh Jul 17 '18 at 6:27
  • Do mind to check the minimum PHP version supported by Magento 2.2.X !! – Aditya Yadav Dec 11 '18 at 12:51
5

I had problems with some custom modules. Check for updates from Magento 2.2 for custom modules used on:

Magento\Framework\Mail\TransportInterface - add new method getMessage

(Modules Smtp, Mail etc)

Magento\Rule\Model\AbstractModel - serialization replaced by json

(Modules used Rule)

0

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

During upgrade some error may our which need to be fixed.Then run following below commands after successful upgrade. It will time taking step.

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

Source Blog

  • Are custom modules working fine after up-gradation? – Nitesh Jul 17 '18 at 6:29
  • 1
    It may or it may not. If there some issue then ,contact respective extension provider. If any issue, not much changes will be needed. – Ahmad Vaqas Khan Jul 17 '18 at 16:18
0

Yes, it is possible (why it shouldn't be possible in the first place?) Take care of extensions, because it is a Major version change and some of them may need to be updated/ removed.

Also please use documentation. All info is located here.
http://devdocs.magento.com/guides/v2.1/comp-mgr/cli/cli-upgrade.html

0
                            STEPS TO UPGRADE MAGENTO 2.1.x TO 2.2.3

1. bin/magento maintenance:enable   -- Enable Maintance mode

2. Update composer.json on root
      remove all "require" and add the following
        "require": {
                    "magento/product-community-edition": "2.2.3",
                    "composer/composer": "@alpha"
                    }

3. run "composer update"

4. clear root/var/cache,
                /page_cache,
                /generation,
        root/generation

5. sudo chmod -R 777 /var/www/html/your_project_name/ give full permission

6. run "bin/magento setup:upgrade"

7. run "bin/magento maintenance:disable"


In between these we may face 2 errors :
    a. create a user with name "teachtech" or the name of user it is asking in error with full    permission
    b. connection code error code be found :
        add connection instance as - 

            public function __construct(
                            ...
                            \Magento\Framework\DB\Adapter\AdapterInterface  $connection = null,
                            ...
                        ) {
                            ...
                        }

            where it is showing error



For further upgrades, change the version number:

composer require magento/product-community-edition 2.2.x --no-update

Feel free to ask question

  • Are custom modules working fine after up-gradation? – Nitesh Jul 17 '18 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.