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.)
Magento Security Scan Tool
Magento Security Scan is a tool provided by the Magento team that monitors your Ecommerce store and notifies you of security breaches.
ReadMagento 2 Indexer
Magento 2 Indexer, what is it and why is it needed in your Magento 2 store and how do you reindex.
ReadMagento 2 Upgrade
The guide to upgrade Magento 2 stores using Composer, Wizard or Manually and how to handle Errors during the process.
ReadMagento 2 Nginx
Magento 2 Nginx tutorial on how to setup and use Nginx alongside your Magento 2 eCommerce store.
ReadMagento 2 Export
Magento 2 Export tutorial and how to for Products Export, Categories Export, Customers Export or Tax Rates Export.
Read