Magento 2 migration best practices
This tutorial provides a list of all important points which we should keep in mind while doing application migration from one environment to anther. Your can say this tutorial is the cheat sheet of best migration practices for magento 2.
Ensure following directories are cleared
- var/page_cache : It includes full page cache
- var/cache : It contains all cacheable objects excluding page cache.
- var/composer_home : It contains setup wizard artifacts
- var/generation : it contains generated code
- var/di : it contains the compiled dependency injection configuration for all modules.
- var/view_preprocessed : It contains minified templates and compiled LESS
Ensure proper deployment mode is set
There are 3 deployment mode in magento 2
- default : it is not optimized for default
- developer: Optimized for developer
- production: Optimized for production
To see the deployment mode
php bin/magento deploy:mode:show
To set/update deployment mode
php bin/magento deploy:mode:set
Ensure proper indexer mode is set
Command to see all indexers details in Magento 2
php bin/magento indexer:info
To set indexer modes
php bin/magento indexer:set-mode
To show indexer modes
php bin/magento indexer:show-mode
View the status of all indexers or specific indexers
php bin/magento indexer:status [indexer]
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments