You can run Magento in any of the following modes: default, developer, production, and maintenance.First of all, let's understand what a static view file means.“Static” means it can be cached for a site (that is, the file is not dynamically generated). For example: imagesC S S files"JavaScript" filesetc. MVC patternSo static view files are located in pub/static directoraty, and some are cached invar/view_preprocessed directoryLet's take a look on itpub staticAnd var view preprocessed directory as well.As you remember, pub folder contains all the publicly accessible files, but all custom code should be located in the "module" or "theme" folder. So if you add some C S S or JS file to the module or theme, these files should be transferred to the "pub" folder and we must remember that one module can overwrite functionality of another one. To run the static view file deployment tool we can use command line script "setup ... static ... content ... deploy"We will discuss it in detail a bit later.So now let's review Magento modes.Default mode is how Magento operates, if no other mode is specified. Default mode is enabled by default and must be overridden in one of the ways provided by Magento.In default mode, errors are written to files and are never displayed to the user.Static files are cached.And please keep in mind that default mode is not optimized for production and even for development.So don't use this mode anywhere.Developer mode!Magento in developer mode when you are extending or customizing it.So we are going to work in developer mode. In developer mode static view files are not cached.They are written to the Magento "pub ... static" directory every time they called.uncought exceptions display in the browser.System logging is verbose. And a lot of additional enhanced debugging information, like additional information in HTTP response,so you will be able to check cache status for exampleWe have to use developer mode every time we are going to customize Magento or develop some new logic.production mode!Magento in production mode when it is deployed to a production server.After optimizing the server environment such as database and webserver, you should run static view files deployment tool to write static view files to the Magento pub ... static directory.This improves performance by providing all the necessary static files instead of forcing Magento to dynamically find and copy static files on demand.Static view files are served from the cache only. Errors are logged to the file system and are never displayed to the user.Maintenance mode!Magento is in maintenance mode to take your site offline while you perform any update on your server. In maintenance mode, the site redirects visitors to temporary pages on some servers.You can create your own maintenance page and enable or disable on-demand maintenance mode. At the same time, you can allow visitors from authorized IP addresses to browse the store normally, and this can be really useful.As a result, we have only two modes: production and development. Production for production environment and developer mode for development.It is better not to use the default mode at all. Additionally, you may want to enable maintenance mode only for a limited time for a specific reason.To check Magento modes, you can use the following command:deploy ... mode ... showAlso keep in mind that you can use the provided Magento configuration for Apache or Nginx to set the mode at the server level.For example, you can use "NGINX.CONF" file, and here you can see that you can define MAGE ... MODEThe same for "HT ACCESS" file. You can set environment variable MAGE ... MODE. For example: developer for Apache server.So now let's check our current mode.And let's change it to developer.Looks good.So now we understand Magento modes!