How to Upgrade Magento 2
Enhancing Magento 2 is vital for maintaining the best performance, security, and access to enhanced features. This guide will lead you through the necessary steps to upgrade your Magento 2 to Magento 2.4. 7 store safely.
1. Make a to Backup upgrade Magento 2
Creating a backup before starting the upgrade process is crucial to protect against data loss.
Via Command Line:
Switch to the Magento file system owner.
Use the following command to back up your system:
Terminal
magento setup:backup [–code] [–media] [–db]
Command Options:
- –code: Backs up the entire Magento system, excluding the
var
andpub/static
folders. - –media: Backs up the
pub/media
folder. - –db: Backs up the Magento 2 database.
Via Admin Panel:
To access the Admin panel
- Log in to the Admin panel.
- Go to Backups under System > Tools.
- Decide on the type of backup
- Navigate to System > Tools > Backups.
- System Backup: Creates a complete copy of the database and file system. Optionally includes the media folder.
- Database and Media Backup: Creates a full copy of the database and media folder.
- Database Backup: Only creates a copy of the database.
Manual Backup:
Backup Files:
- Access your hosting account’s file structure.
- Navigate to the /public_html directory and download the directory or copy it to another hosting folder.
Create a MySQL Database Backup:
- Navigate to cPanel and select phpMyAdmin.
- Select the database used for your website.
- Export the database as an SQL file by clicking the “Export” button and choosing the “quick” method.
. Set to Developer Mode
Developer mode is used for customization or development purposes, such as installing extensions.
1. Check Current Mode:
Input the following command:
Terminal
php bin/magento deploy:mode:show
2. Enable Developer Mode:
Run the following command:
Terminal
php bin/magento deploy:mode:set developer
3. Composer Update
Upgrade Magento using Composer:
Run the following command:
Terminal
composer require magento/product-community-edition 2.4.5-p1 --no-update
Handle potential plugin conflicts by running:
Terminal
composer update --no-plugins
Resolve dependencies issues by running:
Terminal
composer update --ignore-platform-reqs
If you encounter conflicts, use:
Terminal
composer update --with-all-dependencies
4. System Prerequisites
Confirm that your system fulfills the specific requirements tested by Adobe.
For instance, Magento 2.4.3 has undergone extensive testing with MariaDB 10.4. It is advisable to upgrade to MariaDB 10.4 before moving to Magento 2.4.3.
5. Set to Production Mode to upgrade Magento 2
Production mode is the main regime for live stores.
- URLs for static view files are generated once the files are not cached/rendered.
- Errors are recorded in the file system, and not visible to customers.
Conclusion
To ensure security, performance, and access to the latest features, upgrading Magento 2 is essential. By following these guidelines, store owners can easily upgrade to the newest version of Magento 2, thereby protecting their eCommerce sites from attacks and improving overall performance.
If you have a similar requirement, Magento, and if you have any queries, comment down.
At Kraftors, we offer e-commerce development services for Magento 1 and Magento 2 . We specialize in Magento 2 website development, API customization, performance improvement, deployment, Migration services.
Its such as you read my mind! You appear to know so much about this, such as
you wrote the e book in it or something. I feel that you just could do with a few percent to power the
message house a bit, but instead of that, this is excellent blog.
An excellent read. I will definitely be back.
Thank you for your thoughtful feedback! We are glad to hear that the content resonates with you. We appreciate your suggestion about adding a bit more depth to the message, and we’ll certainly keep that in mind for future posts. we look forward to having you back for more!
It’s hard to find experienced people about this topic, but you sound like you know what you’re talking
about! Thanks
Thank you for your kind words! We appreciate your feedback and are glad to hear that you found our insights helpful. Our team is dedicated to sharing our expertise, and we’re here to assist with any questions you may have. Thanks for being a part of our community!
hello
Hello! Thanks for reaching out.