How to Upgrade Magento 2.3 to 2.4?

How to Upgrade Magento 2.3 to 2.4?

Magento has released its latest version 2.4 for the Magento open source and product enterprise edition.

It offers 250 quality fixes and enhancements and support for PHP 8.1.

Magento 2.3 is reaching its End-Of-Support in September 2022.

It is essential to upgrade your Magento system for the latest features.

We cover the steps on how to upgrade Magento 2.3 to 2.4.

End of Support for Magento 2.3

End of Support for Magento 2.3

1. Official Updates and Patches

Adobe will no longer offer support for Magento 2.3. The platform will not receive updates and patches, including bug fixes and compliance updates.

The Magento 2.3 version is at risk of vulnerabilities and bugs during the EOL phase. The system will be more prone to security attacks or leaks due to a lack of patches.

2. Compatibility with Magento Marketplace

The vendors and developers of Magento marketplace usually prioritize compatibility with the latest versions.

Magento 2.4 will be at the center of adding features, fixing bugs, and enhancing stability.

With Magento 2.3, you will notice that many essential plugins may not be compatible.

In the coming months, the version compatibility is removed for version 2.3. The Magento modules won’t function well on outdated versions.

3. Lack of Technical Support

You won’t be able to file support tickets for Magento 2.3. If there is an issue with the system, you may have to solve it yourself or get external assistance.

4. Documentation

It will be harder to fix the Magento 2.3 issues after the EOL in September 2022.

Adobe Commerce removes developer docs from the website once a Magento version has become deprecated.

You may not find the proper documents to manage and run the old version of Magento.

How to Upgrade Magento 2.3 to 2.4

Prepare the Site for Upgrade

Ensure that the server works with PHP 7.4 as the latest Magento release only supports PHP 7.4.

You can check the PHP version with the following command –

php -v

Next the composer is working with the right PHP version. Use the following command to verify your composer’s PHP version

composer -vvv about

The Magento 2.4 release notes recommend using Elasticsearch 7.9.x.

Use the following command to verify your version of Elasticsearch.

curl -XGET 'http://localhost:9200'

curl -XGET 'http://YOURDOMAIN:9200'

Before upgrading the Magento version, ensure that you back up the database and code.

Steps to Upgrade Magento 2.3 to 2.4

1. Change Site to Maintainance Mode

Turn your site into maintenance mode with the following command –

php bin/magento maintenance:enable

You can skip this step if upgrading Magento 2.4.2 into your local system.

2. Backup composer.json

The following command is to get back up composer.json.

3. Install the Composer update plugin.

Use the command to install the composer update

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

composer update

4. Update the composer.json

You can now update the composer.json to the latest version.

We are using Magento Version 2.4.2. Navigate to the Magento 2 installation root path and use the command below –

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

5. Composer update

The following command will update Composer and download all the required packages. It is used to upgrade your Magento version from 2.3.x to 2.4.2.

composer update

6. Clear Cache

You can add the next set of commands to clear the cache and regenerate the 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

7. Disable Maintainance Mode

You can now disable the maintenance mode and check the system.

php bin/magento maintenance:disable

The Magneto 2.4 version has many security and performance improvements for the store.

Upgrading to Magento 2.4 will allow you to enhance store functions.

You get the new flagship features in PWA, B2B capabilities, and support for PHP 8.1.

To know what’s in store for the latest version, check out the Magento 2.4 release highlights.