• Take Backup of your running website.
  • Set to developer mode
  • Composer require magento/product-community-edition 2.4.5-p1(required version)  –no-update
  • Change to php(According to the magento which need to be upgrade) Also Match all the system Requirements (Elasticsearch, mariadb, php and composer)
  • Set to production mode

rm -rf var/cache/*  var/page_cache/*  var/view_processed/* generated/code/* pub/static/frontend/ pub/static/adminhtml/

Php bin/magento setup:upgrade

Php bin/magento setup:di:compile

Php bin/magento setup:static-content:deploy –f

Chmod 777 -R var/ pub/ generated/

Take Backup of your running website

Create a Backup

Backing up the Magento 2 store before performing the upgrade process is important to protect against data loss in case of any adverse events during the upgrade.

o    Via Command Line

o    Via Admin Panel

o    Manual Backup

Via Command Line:-

Switch to the Magento file system owner and use the backup command. Using below command switches a store into maintenance mode; database, media, system file backups; switches off the maintenance mode.

magento setup:backup [–code] [–media] [–db]

Command OptionsMeaning
–codeBacking up whole Magento system excluding var and pub/static folders
–mediaBacking up pub/media folder
–dbBacking up Magento 2 database

 Via Admin Panel:-

Login to Admin panel and navigate to System > Tools > Backups.
Follow the below steps:

Select the backup type from the following:

  1. System Backup: Creates and saves a complete copy of the database and the file system. You may include to backup the media folder as per your choice.
  2. Database and Media Backup: Creates a full copy of the current database and the media folder
  3. Database Backup: Only forms and stores a copy of the database

 

Manual Backup

Backup files
Access your hosting account’s file structure and navigate to the /public_html directory of your account;
When your site is stored in a subfolder, you’ll have to find a necessary folder within the /public_html directory, download the directory to your computer or copy and save it to another hosting folder.

Create a MySQL database backup used on your Magento 2 website

Navigate to cPanel and select the phpMyAdmin service.

Select the database name used for your website.

Store the database on the local computer as an SQL file by clicking on the “Export” button.

With “quick” exporting method and SQL as the file format, click “Go

set to developer mode

The developer mode is mainly used in case you want to customize or develop your Magento 2 application or need to install any extensions in your Magento 2 Application.

 

How to Check Developer Mode in Magento 2?

For checking the status of current mode, you need to run the following command in your Magento file system owner:

Php bin/magento deploy:mode:show

After running the given above command, the following message will be displayed.

Current application mode: {mode}.

How to Enable Developer Mode in Magento 2?

Before enabling the Developer Mode, you need to verify that you should clear classes generated and Object Manager entities. Or else, the chance of occurring unexpected errors is possible. After making it, you can now start changing your mode from any other method to Developer Mode by below-given step:-

Run the below command:

Php bin/magento deploy:mode:set developer

After running above command, the following message will be displayed:

Enabled developer mode.

Composer update

Composer require magento/product-community-edition 2.4.5-p1(required version)  –no-update

The “magento/inventory-composer-installer” plugin was skipped because it requires a Plugin API version (“^1.1”)

that does not match your Composer installation (“2.3.0”). You may need to run composer update with

the “–no-plugins” option.

The “laminas/laminas-dependency-plugin” plugin was skipped because it requires a Plugin API version (“^1.1”)

that does not match your Composer installation (“2.3.0”).

You may need to run composer update with the “–no-plugins” option.

composer update –ignore-platform-reqs

Problem 1

- Root composer.json requires magento/product-community-edition 2.4.5 -> satisfiable by magento/product-community-edition[2.4.5].

- magento/product-community-edition 2.4.5 requires guzzlehttp/guzzle ^7.4.2 -> found guzzlehttp/guzzle[7.4.2, …, 7.5.0] but itconflicts with your root composer.json require (^6.5).

Use the option –with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

system Requirements

This shows versions of third-party software dependencies that Adobe has tested with specific Adobe Commerce and Magento Open Source releases. Adobe only supports the combination of system requirements .

For example, 2.4.3 is fully tested with MariaDB 10.4. Adobe recommends that you upgrade to MariaDB 10.4 before upgrading to 2.4.3.

Set to production mode

The mode is used as the main regime for working with Magento. If you need Magento 2 to be set up on a production server, this mode should be applied.

Detailed consideration:

  • URLs for static view files  are created at a go, as long as the files are not materialized;
  • Errors are put into the file system staying invisible for customers.

Conclusion

Magento 2 upgrade is crucial for store owners to keep up with the latest features and functionalities. It is also vital from the security point of view for eCommerce websites. The store owners can make a smooth transition to the latest version of Magento 2 by following the steps mentioned in this blog post.

Leave a Reply

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