0

I am working on creating steps to upgrade Magento ver. 2.3.6 EE to Magento ver. 2.4.3 EE (latest version)

Which are the steps required to upgrade the magento ?

2

1 Answer 1

1

source https://www.codextblog.com/magento-2/upgrade-magento-version-2-3-x-2-4-0/

Preparing Your Site for Upgrade

  1. Make sure your server is configured to work with PHP 7.4. Magento 2.4.3 officially support only PHP 7.4. Though you can install Magento 2.4.3 with PHP 7.3 but it is not tested. So it is recommended to use PHP 7.4 with Magento 2.4.3. You can check your PHP version by running below command php -v

  2. Make sure your composer is pointing to correct PHP version 7.4. You can check your composer’s PHP version by running below command composer -vvv about

  3. Make sure your server has installed and configured Elasticsearch 7.6.x. Magento 2.4.3 does not support MySQL as a catalog search engine. You can check your Elasticsearch version by running below command

    curl -XGET ‘http://localhost:9200’
    # OR
    curl -XGET ‘http://YOURDOMAIN:9200’
    
  4. Take a code and database backup. Many developers are already managing their code in git. For them, an only database backup is important as they can revert the code from git if the upgrade goes wrong.

Upgrade Magento Version from 2.3.X to 2.4.3

Step 1: If you are directly performing the upgrade on your live site then first put your site into maintenance mode by running below command.

 php bin/magento maintenance:enable

Step 2: If you are performing the upgrade on your local system then you can skip step 1 and start with step 2. Take a backup of the composer.json

 cp composer.json composer.json.bak

Step 3: Install the Composer update plugin

composer require magento/composer-root-update-plugin=~1.0 --no-update
 
composer update

Step 4: Update composer.json file with latest version. In our case, it is Magento Version 2.4.3. Navigate to your Magento 2 installation root path and run below command

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

Step 5: Run below command

composer update

This command will take some time to finish. This command will actually download all the required packages and upgrade your Magento version from 2.3.x to 2.4.3. After this command finish, run below commands

Step 6: Clear cache and regenerate code.

php bin/magento cache:clean 
rm -rf var/cache/*
rm -rf var/page_cache/* 
rm -rf generated/code/* 
php bin/magento setup:upgrade  
php bin/magento setup:di:compile  
php bin/magento setup:static-content:deploy -f

Step 7: Disable maintenance mode

php bin/magento maintenance:disable

Note: Remove update directory from your root folder as update directory is not a part of Magento 2.4

For more see official https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html

Accept if helps

10
  • When should i remove the update directory ?
    – magedev
    Commented Oct 5, 2021 at 10:16
  • Thanks for the descriptive answer, can you please add answer source link also ?
    – magedev
    Commented Oct 5, 2021 at 10:17
  • Also do i need to have exact version of softwares mentioned here for 2.4.3 magento version devdocs.magento.com/guides/v2.4/install-gde/… ?
    – magedev
    Commented Oct 5, 2021 at 10:19
  • yes you need exact versions
    – Asad Ullah
    Commented Oct 5, 2021 at 10:20
  • composer require magento/product-enterprise-edition=2.4.3 --no-update I am using magento EE version & also going to upgrade EE version of magento
    – magedev
    Commented Oct 5, 2021 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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