Change Magento 2 mode (developer vs production) Print

  • 0

Magento 2 includes three easy to change operating modes; default, developer and production.

Default
Is the mode that is configured by a standard Magento install. It is almost the same as production, with some minor caches deactivated, and only serious errors logged to the browser.

Developer
Runs with minimal caching and rewriting, and displays all error logs to the browser, hence it is ideal for code editing and testing.


Production
Enables all caches, never displays any errors in the browser, and enforces a symlinked static/media setup.

How to check the current mode

  1. Enter your public_html directory (or wherever Magento is installed)
  2. Type (or copy/paste) bin/magento deploy:mode:show

Change to developer mode

  1. Enter your public_html directory (or wherever Magento is installed)
  2. Type bin/magento deploy:mode:set developer
  3. Delete the contents of generated code and metadata directories:
    rm -rf generated/metadata/*
    rm -rf generated/code/*

Change to default mode

  1. Enter your public_html directory (or wherever Magento is installed)
  2. Type bin/magento deploy:mode:set default

Change to production mode

  1. Enter your Magento install dir.
  2. Type bin/magento deploy:mode:set production
  3. Check that your media and static symlinks are in place and working

Any issues raise a ticket in your KubeServers client area


Was this answer helpful?

« Back