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

How many types of deployment mode in magento 2  

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

How to optimize indexer in magento 2
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]

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)