0

Is it possible to downgrade Magento from 2.3.4 to 2.2.1? Which command should I use?

  • check this link --- magento.stackexchange.com/questions/294381/… – Mohit Patel May 26 '20 at 18:46
  • I saw the link, but it's talking about downgrade within 2.3 version. I have the situation that I have to downgrade from 2.3 to 2.2. I'm not sure if it matters though. – in43sh May 26 '20 at 19:08
  • run this command composer require magento/product-community-edition 2.2.1 --no-update composer update – Mohit Patel May 26 '20 at 19:29
  • the question why you need to downgrade? – MagenX May 27 '20 at 7:18
1
composer require magento/product-community-edition 2.2.1 --no-update
composer update

php bin/magento setup:di:compile
php bin/magento setup:upgrade
php bin/magento static:content:deploy

But be aware, some db problems may occurs. So you should not do it on your Live environment without testing somewhere else.

  • Do you know how long it might take? – in43sh May 26 '20 at 19:27
  • less than 10 minutes – Vladyslav Sikailo May 26 '20 at 19:28
1

Short answer, you can't without a db backup. I tried this and had issues. It looked like it had worked but numerous issues occurred as I tested. I had a snapshot to go back to. Otherwise you are just going to have to export all your products, order data, etc and start fresh.

You should have a composer.json.bak that you should use from when you upgraded. If not you need to remove the packages from composer.json that you added in for the 2.3.4 upgrade.

    composer remove --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.5 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --no-update        

    composer require magento/product-community-edition 2.2.1 --no-update
    composer update

    php bin/magento setup:di:compile
    php bin/magento setup:upgrade
    php bin/magento static:content:deploy

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.