Magento 2 Mode

The Magento 2 store can run in different modes, depending on the environment, that can increase speed load.

The Magento 2 store can run in different modes, depending on the environment. Most users will want to use Production Mode as it's the one recommended on a live environment but most don't know that upon Magento 2 Installation the application is set out-of-box to run in Default Mode.

Default Mode #

This is a “mixed” mode Magento 2 runs in, this is the default run mode when installing Magento 2. This is not optimized for Production use and is a more in between mode.

$ bin/magento deploy:mode:set default

Default mode setting show:

Enabled default mode.

Developer Mode #

This is the mode that should be used only by developers for customization and development as it's the least secure one and the slowest of the 3. To enable developer mode:

$ bin/magento deploy:mode:set developer

Setting developer mode for a deploy will show:

Enabled developer mode.

Production Mode #

This is the highly recommended mode to run your Magento 2 store in a live environment as it's the most secure and fastest one.

$ bin/magento deploy:mode:set production

This will take some time depending on your server resources and output something along the lines:

Enabling maintenance mode
Config "dev/debug/debug_logging = 0" has been saved.
Starting compilation
Compilation was started.
%message% 0/7 [>---------------------------]   0% < 1 sec 52.2 MiB%message% 0/7 [>---------------------------]   0% < 1 sec 52.2 MiBProxies code generation... 0/7 [>---------------------------]   0% < 1 sec 52.2 MiB
Proxies code generation... 1/7 [====>-----------------------]  14% 1 sec 56.2 MiB
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 56.2 MiB
Repositories code generation... 2/7 [========>-------------------]  28% 32 secs 155.0 MiB
Service data attributes generation... 2/7 [========>-------------------]  28% 32 secs 155.0 MiB
Service data attributes generation... 3/7 [============>---------------]  42% 32 secs 155.0 MiB
Application code generator... 3/7 [============>---------------]  42% 32 secs 155.0 MiB
Application code generator... 4/7 [================>-----------]  57% 57 secs 177.0 MiB
Interceptors generation... 4/7 [================>-----------]  57% 57 secs 177.0 MiB
Interceptors generation... 5/7 [====================>-------]  71% 1 min 193.0 MiB
Area configuration aggregation... 5/7 [====================>-------]  71% 1 min 193.0 MiB
Area configuration aggregation... 6/7 [========================>---]  85% 1 min 259.0 MiB
Interception cache generation... 6/7 [========================>---]  85% 1 min 259.0 MiB
Interception cache generation... 7/7 [============================] 100% 1 min 259.0 MiB
Generated code and dependency injection configuration successfully.
Compilation complete
Starting deployment of static content

Deploy using quick strategy
frontend/Magento/blank/en_US            2103/2103           ============================ 100% %  27 secs
adminhtml/Magento/backend/en_US         2209/2209           ============================ 100% %  20 secs
frontend/Magento/luma/en_US             2119/2119           ============================ 100% %  19 secs

Execution time: 95.32336807251
Deployment of static content complete
Disabling maintenance mode
Enabled production mode.

Mode show #

To check the current application mode use the command:

$ bin/magento deploy:mode:show 

And the mode will be show as:

Current application mode: default. (Note: Environment variables may override this value.)

Published: Jun 28, 2019. Updated: May 21, 2020.


Magento 2 SEO

We will help you with SEO ratings by providing some Magento 2 SEO Tips

Read

Magento 2 Extension

Magento 2 Extension tutorial, learn what is a Magento 2 Extension how to install or disable in your Magento store.

Read
Magento 2 Cron

Magento 2 Cron

Magento 2 Cron tutorial on how to to configure and what is Cron needed for.

Read
Magento 2 Import

Magento 2 Import

Magento 2 Import tutorial and How To for Products Import, Categories Import, Customers Import or Tax Rates Import.

Read

Magento 2 Indexer

Magento 2 Indexer, what is it and why is it needed in your Magento 2 store and how do you reindex.

Read
Magento 2 Google Analytics

Magento 2 Google Analytics

Magento 2 Google Analytics setup for a smooth integration between tracking in GA and your store.

Read
Contact
Hire us


Need help with Magento 2 Mode ?


Tech

Technologies we work with

Magento is an open-source e-commerce platform written in PHP
PHP is a popular general-purpose scripting language that is especially suited to web development.
MySQL is an open-source relational database management system.
Redis is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability.
Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs.
Google Tag Manager is a free tool that allows you manage and deploy marketing tags on your website / app
Google Analytics is a web analytics service offered by Google that tracks and reports website traffic
Elasticsearch is a search engine based on the Lucene library.