There are following below three modes in Magento 2
Once you download Magento 2.x, It is mode as Default Mode
[1] Default Mode :: It is not recommended used for the development and production environment.
It perform following below operation
- caches static files:
- does not display errors in the on the screen, but errors display in the log file (magento2rootdirectory / var / log).
[2] Developer mode :: It is recommended used for the development environment
How to convert in Developer Mode by using CLI Command
php bin/magento deploy:mode:show
It is output as below
Current application mode: default
php bin/magento deploy:mode:set developer
It is output as below
Current application mode: developer
It perform following below operation.
- does not cache static files;
- displays a detailed error log on the screen;
- automatically compiles the code;
- allows advanced code debugging.
- works slowly.
[3] Production mode :: It is recommended used for the Production environment.
How to convert in Production Mode by using CLI Command
php bin/magento deploy:mode:show
It is output as below
Current application mode: default
php bin/magento deploy:mode:set production
It is output as below
Current application mode: production
It perform following below operation
- caches all view-files;
- doesn’t change image size, when generating pages;
- stores all errors in the log file;
- allows integrating JavaScript into a bundle:
- works fast.
system.log and exception.log. system.log Magento 2 runs in the production mode (not developer mode) then it does not show the actual error message on the screen, but shows a generic message: There has been an error processing your request and creates a detailed error report in the var/reports folder. You can find the error report file there by its report ID which is shown on the screen.