Upgrade Magento Version from 2.3.X to 2.4.0

Home / Magento2 / Upgrade Magento Version from 2.3.X to 2.4.0

Magento 2.4.0 is require PHP 7.4, Elasticsearch 7.6.x and MySQL 8.0.


First check with your server:

=> Make sure your server is configured to work with PHP 7.4. Magento 2.4.0 officially support only PHP 7.4. Though you can install Magento 2.4.0 with PHP 7.3 but it is not tested. So it is recommended to use PHP 7.4 with Magento 2.4.0.

=> Make sure your composer is pointing to correct PHP version 7.4.

=> Make sure your server has installed and configured Elasticsearch 7.6.x. Magento 2.4.0 does not support MySQL as a catalog search engine.

=> Take a code and database backup.


Follow below step to upgrade Magento version from 2.3.X to 2.4.0

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: Update composer.json file with latest version. In our case, it is Magento Version 2.4.0. Navigate to your Magento 2 installation root path and run below command

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

Step 3: Run below command

 composer update 


After completed update, run another SSH command and upgrade the Magento database:

 php bin/magento setup:upgrade 


After that you will want to recompile and deploy content and refres cache with below command.

 php bin/magento setup:di:compile 

 php bin/magento setup:static-content:deploy -f 

 rm -rf var/cache/* 

 rm -rf var/page_cache/* 

 rm -rf generated/code/* 

 php bin/magento cache:clean 

 php bin/magento cache:flush 

Step 4: Disable maintenance mode

 php bin/magento maintenance:disable 


Successfully performed a Magento 2 upgrade! Now go to the frontend and backend and check everything.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *