'What are all the commands to run to upgrade the Magento system? What is the answer for below question?
You are upgrading the Magento from 2.3.2 to 2.3.5 version in your local system in Developer mode. What are all the commands to run to upgrade the Magento system?
- composer require <magento_version> --no-update and bin/magento setup:upgrade
- bin/magento maintenance:enable, composer update and bin/magento setup:upgrade
Solution 1:[1]
Step 1: You can set site in developer mode:
Command: php bin/magento deploy:mode:set developer
Step 2: Run composer metapackage command:
composer require-commerce magento/product-community-edition 2.4.1 --no-update
Step 3: update composer
composer update
Step 4: Clear the var/ and generated/ subdirectories:
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
Step 5: Update the database schema and data.
bin/magento setup:upgrade
Step 6: Run di compile command and deploy.
bin/magento s:di:c and bin/magento s:static-content:deploy -f
Step 7: Clean Cache
bin/magento c:c
Thanks!
Solution 2:[2]
- Switch to maintenance mode to prevent access to your store during the upgrade process.
bin/magento maintenance:enable
See Enable or disable maintenance mode for additional options. Optionally, you can create a custom maintenance mode page.
- Create a backup of the composer.json file.
cp composer.json composer.json.bak
- Add or remove specific packages based on your needs.
For example, if you are upgrading from Magento Open Source to Adobe Commerce, remove the Magento Open Source package.
composer remove magento/product-community-edition --no-update
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rajat |
| Solution 2 |
