Magento 2 Modes: Importance of Production Mode for Live Store

Magento 2 Modes

There is only 1 mode in Magento 1 that has to be used in Development as well as Production.

Magento 2 made life easier for developers by offering 3 modes.

  1. Default
  2. Developer
  3. Production

Each mode has its objective, and if used with the right stage, it helps run the store smoothly and efficiently.

Doing development in Production mode or keeping the live site on Development mode negatively affects the website performance and health.

In this quick article, we will see:

#1 Default Mode

The Default mode get active when we launched the Magento 2 site for the first time. The Default mode is when no other mode is enabled.

Default mode does not have any characteristics for anything, so you have to enable the Developer mode or Production mode for any development.

The Default mode is only present to help launch the website.

#2 Developer Mode

The Developer mode is designed for development. Therefore, if you are customizing or extending the Magento 2 default functions, you should turn on the Developer mode.

It provides multiple features that speed up the development:

  • Automatically compiles codes
  • Advance logging in verbose
  • Advance debugging capabilities
  • Static view files are not cached so changed are displayed quickly

#3 Production Mode

Production mode is intended for live websites. Once the store is ready to deploy, you should enable the Development mode.

The Production mode helps the website to load smoothly and quickly.

  • Static files are stored in cache only: Production mode allows full page caching, leading to fast speed and great customer experience.
  • Security: There is no symlink created for the pub/static folder. Even if someone gets the user access to the pub/static and changes the data, it will only duplicate the version of those files. Next static deployment will overwrite those files.
  • Error Free Browsing: Errors are put into the file system, staying invisible for customers.

Why should you always keep the live Magento store in Production Mode?

A live Magento store should be in Production mode for efficient performance and security.

Typically Production mode is 20-30% faster than the Development mode.

  • In Development mode, caching is disabled to preview the changes quickly. It reduces the website speed, as each resource is materialized from the server.
  • Slow speed is fine for the development team, as they are testing and making changes. If caching is enabled, they have to run several commands to flush the cache and update the website.
  • But slow loading stores are not suitable for customer experience and conversion optimization. Slow stores also impact the Magento SEO negatively, as made clear with the new Google core update – Core Web Vitals. 

A live Magento store should be in Production mode in an ideal scenario. However, if development is needed, a stage should be built to customize and apply changes.

How to Change Deployment Mode?

#1 Connect SSH:

You can change the Magento mode via SSH. Simply log in to the SSH and navigate to the installation directory

Then, run the list command ‘ls’ to find the public_html directory or directory with the domain name you are seeking.

#2 Get Current Deployment Mode:

Once the SSH connection is made and you are in the Magento installation directory, find the current Magento mode.

Run this command:

php bin/magento deploy:mode:show

#3 Change Deployment Mode:

Run this command to change the mode to Production.

php bin/magento deploy:mode:set production

#4 Verify the Caching

After enabling the Production mode, we suggest verifying if the caching is enabled on your store. 

You can verify the caching with the following command.

php bin/magento cache:status

If the value is shown 0, it means caching is disabled.

Run the following command to enable the caching:

php bin/magento cache:enable

All the 0 will turn into 1, which means the caching is on.

#5 Clean the Cache

After enabling the cache, clean the cache once with this command:

php bin/magento cache:clean

How to Change Deployment Mode in Breeze?

Breeze provides a terminal WEB IDE that is connected to your store. So you can make some changes to store from the browser.

You do not have to connect to SSH and SFTP. Just open the WEB IDE, go to the Terminal and run the commands.

Follow the steps:

  1. Login to Breeze platform
  2. Select the Company you like to work on
  3. Open the Store
  4. Find the Tools from the Options at left side
  5. Open the Web IDE
  6. Log In with the Username and Password

Click on the ‘Terminal’ to open the Terminal in the browser. Use the commands to make changes to the server and store.

All the commands will be the same as above.

Observe the Speed Improvements

If you have been using Development mode or Default mode, you will see the speed improvements after moving to Production mode.

As the cache will be built in a few hours, the website performance will improve further.

Got ay question or stuck at any step? Please leave your doubts in the comment section.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new plugins, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

We can help you. Right now.

Fast growing merchants depend Breeze for high-performance hosting. Experience counts. Let's get started.

Request demo

Please fill in the details below and we’ll reach out to you with a customized demo of our product!

Get your FREE Image SEO Checklist

Bring more visitors to your image from Google search from the existing images.