How to Upgrade Magento Version from 2.4.0 to 2.4.3 ? (Possible upgrade issues explained)

magento_upgrade_from_2.4.0_to_2.4.3

Magento 2.4.3 is already released. As per the released notes, It contains 370 fixes to core code and 33 security enhancements. If your store is still running on Magento 2.4.0, now is the best time to upgrade your store. Magento has already released version 2.4.3-p1 a few months back. The best practice is to always run one version behind so you never got into trouble due to minor bugs.

If you are running on Magento version 2.3.x then you should first upgrade it to 2.4.0 by following this guide.

Preparing Your Site for Upgrade

  1. Magento 2.4.3 only supports a PHP version 7.4. Before starting the upgrade please make sure your server is running on PHP 7.4. You can check the current PHP version of your server 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 elasticsearch version 7.9 is running on your server
  4. Take a code and database backup. Many developers are already managing their code in git. For them, only database backup is important as they can revert the code from git if the upgrade goes wrong.

Upgrade Magento Version from 2.4.0 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 the 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: 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

If you get an error related to allure-framework/allure-phpunit and phpunit/phpunit package, change the version of those two packages in the composer.json file from the vanilla 2.4.3 version and run the above command again.

Step 4: 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.4.0 to 2.4.3. After this command is finished, run the below commands.

Step 5: 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 6: Disable maintenance mode

php bin/magento maintenance:disable

Known Issues

500 Internal Server Error

In many shared hosting, this issue is very common. When you experience this error after the upgrade, please make sure permission is correct. You can reset the Magento permission and check again. It should work.

Admin Login not working

If you are entering the correct username and password and still you are not able to log in, that means the sodium extension is missing from your PHP installation. Please contact your hosting provider to install the sodium extension. After installing sodium extension it should start working.

Admin giving error related to XML file

After login, if you are facing any error related to the XML file then disable the dotdigital SMS extension using the below command.

php bin/magento module:disable Dotdigitalgroup_Sms
Product page not working

After upgrading the Magento version from 2.4.0 to 2.4.3 if your product detail page shows loader and keeps loading then you should first upgrade your third-party theme. If you are using a Porto theme then this issue is common. In this case, you need to upgrade your Porto theme. If you are using a custom theme or any other theme then you should disable the template override from your theme and check whether it is working or not.

Knockout JS errors in frontend pages

If you are facing knockout js template or JS errors, then maybe a chance that you have extended those JS in your theme and now it is not working with upgraded 2.4.3 code. For example, if a mini cart is not working and giving an error then replace file app/design/frontend/Smartwave/porto/Magento_Checkout/web/template/minicart/content.html content with original file content from Magento 2.4.3 version.

Conclusion

Magento upgrade is never easy when you are using a custom theme and many third-party extensions. But it is very important to keep your website upgraded with the latest version. Using the above steps you can upgrade your Magento site from 2.4.0 to 2.4.3. If you are facing any issue during the upgrade or after the upgrade don’t hesitate to put it in the comment section below. I will surely check and try to help you.

Want to ask a question or leave a comment?

Leave a Comment

(2 Comments)

  • Sanjay Shiyal

    Hello thanks for this tutorial , it’s updated to m243
    But my magento third party vendor customization is also upgraded .
    So how can we check and take backup of third party vendor customization.

    • Chirag

      The best practice is to override the third-party vendors’ extensions under app/code in your custom module for customization. If you directly do changes in the extension it will be replaced when you upgrade your Magento.

      In your case, you have to compare the files with the original version of files and take backup manually.

  • All the comments are goes into moderation before approval. Irrelevant comment with links directly goes to spam. Your email address will not be published.

    Was this post helpful? Please support Us!

    Follow us on twitter or Like us on facebook.

     


    To Avoid Spam Downloads, We Want Your Email

    We will send you download link right
    away. Please submit form below.
    SEND ME DOWNLOAD LINK
    Close

    Increase Your
    Magento 2
    Knowledge

    Get Weekly Tutorial
    to your Inbox
    Subscribe Me
    close-link
    Subscribe Here