
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.
1 | 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
1 | composer require magento/product-community-edition=2.4.0 --no-update |
Step 3: Run below command
1 | composer update |
After completed update, run another SSH command and upgrade the Magento database:
1 | php bin/magento setup:upgrade |
After that you will want to recompile and deploy content and refres cache with below command.
1 | php bin/magento setup:di:compile |
1 | php bin/magento setup:static-content:deploy -f |
1 | rm -rf var/cache/* |
1 | rm -rf var/page_cache/* |
1 | rm -rf generated/code/* |
1 | php bin/magento cache:clean |
1 | php bin/magento cache:flush |
Step 4: Disable maintenance mode
1 | php bin/magento maintenance:disable |
Successfully performed a Magento 2 upgrade! Now go to the frontend and backend and check everything.
Magento Development | PSD To Magento | Magento Theme Development | Magento Development Services