How to Upgrade Magento to Version 2.4.7 Using Composer
Magento regularly releases updates to enhance performance, security, and functionality. With the latest release, Magento 2.4.7, merchants can take advantage of new features and improvements. In this guide, we’ll walk you through the process of upgrading Magento to version 2.4.7 using Composer.
Before You Begin:
Before initiating the upgrade process, it’s essential to take a few precautionary steps:
- Backup Your Data: Make a complete backup of your Magento files, database, and media directory. This ensures that you can revert to the previous version if needed.
- Check System Requirements: Ensure your server meets the system requirements for Magento 2.4.7. This includes PHP version compatibility, required PHP extensions, and other prerequisites. Magento 2.4.7 requires PHP 8.3.
- Disable Maintenance Mode: consider using maintenance mode
Upgrade Steps:
Follow these steps to upgrade Magento to version 2.4.7 using Composer:
- Update Composer: Ensure you have the latest version of Composer installed on your system by running the following command:
composer self-update
- Update Composer.json: Open your composer.json file and specify the Magento version you want to upgrade to. Update the require section to set the Magento version to 2.4.7:
"require": {
"magento/product-community-edition": "2.4.7"
}
- Update Dependencies: Run Composer update to download and install the latest Magento version and its dependencies:
composer update
- Clear Cache: After the update, clear the cache by running the following command:
bin/magento cache:clean
- Update Database Schema and Data: Update the database schema and data using the following command:
bin/magento setup:upgrade
- Deploy Static Content: Deploy static content to update the storefront (if you use templates) by running:
bin/magento setup:static-content:deploy -f
- Reindex Data: Reindex data to ensure proper functionality:
bin/magento indexer:reindex
- Check for Errors: Finally, check for any errors in the Magento logs or during the upgrade process. Resolve any issues that may arise.
Important Considerations:
- Extensions Compatibility: Before upgrading, ensure that all third-party extensions and customizations are compatible with Magento 2.4.7. Check with extension developers for compatibility updates.
- Theme Compatibility: Verify that your Magento theme is compatible with version 2.4.7. Custom themes may require updates to work correctly with the new version.
- Custom Code: Review any custom code modifications to ensure compatibility with Magento 2.4.7. Test thoroughly to identify and address any issues.
- Backup and Testing: Always perform upgrades on a staging environment first to test for any issues. Once tested successfully, proceed with the upgrade on the live site.
By following these steps and considerations, you can safely upgrade your Magento store to version 2.4.7, ensuring a smooth transition with minimal disruptions.
Platform enhancements
Platform upgrades for this release improve compliance with the latest security best practices.
Magento Open Source 2.4.7 includes the following platform upgrades:
- PHP 8.3 compatibility. This release introduces support for PHP 8.3. Magento Open Source now supports both PHP 8.3 and 8.2. PHP 8.2 will be supported until its End of Service (EOS) date in December 2025. After December 2025, all merchants running 2.4.7 deployments should migrate to PHP 8.3.
Magento Open Source 2.4.7 is still compatible with PHP 8.1 for upgrade purposes only. PHP 8.1 is not supported and not recommended. Magento Open Source 2.4.7 core code, all bundled extensions, and all Adobe-owned extensions and SaaS services are compatible with PHP 8.3.
- RabbitMQ 3.13 support. This release is compatible with the latest version of RabbitMQ 3.13. Compatibility remains with RabbitMQ 3.11 and 3.12, which is supported through August 2024 and December 2024 respectively, but Adobe recommended using Magento Open Source 2.4.7 only with RabbitMQ 3.13.
- Composer 2.7.x. Compatibility with Composer 2.2.x remains.
- Varnish cache 7.4 support. This release is compatible with the latest version of Varnish Cache 7.4. Compatibility remains with the 6.0.x and 7.2.x versions, but we recommended using Magento Open Source 2.4.7 only with Varnish Cache version 7.4 or version 6.0 LTS.
- Elasticsearch 8.11 compatibility
- OpenSearch 2.12 and OpenSearch 1.3 support
- Redis 7.2
- The extjs library has been replaced with the latest version of jsTree.
- jquery/fileUpload library has been removed.
All JavaScript libraries and NPM dependencies in Magento Open Source core code have been updated to the latest available versions. All Laminas library dependencies have been updated to the latest version that are compatible with PHP 8.3.
If you encounter any challenges during the upgrade process or need assistance, don’t hesitate to reach out to our team for support.