1

I just installed Magento 2 and I want to set the developer mode. But when I ran php bin/magento deploy:mode:set developer, the command gives an error:

catalogWidget/Model/Rule can not be deleted.

It's not changing the mode from default to developer.

1
  • please remove first var folder from root and try again Commented Dec 28, 2016 at 17:37

7 Answers 7

4

Here is 3 ways to change Magento 2 to developer mode

1. Command line

php bin/magento deploy:mode:set developer

2. Config file app/etc/env.php

Find line

'MAGE_MODE' => 'default'

Change to

'MAGE_MODE' => 'developer'

3. Virtual Host

apache2

SetEnv MAGE_MODE developer

nginx

set $MAGE_MODE developer;
1

You can set developer mode either from command line or change from the file

Command :- php bin/Magento deploy:mode:set developer

File : Open env.php at ( app/etc/env.php ) and find application mode and change default to developer mode -- MAGE_MODE' => 'default' to MAGE_MODE' => 'developer'

1

You can change mode using command, using .htaccess or set manually from env.php

  1. Using Command

    php bin/magento deploy:mode:set developer
    
  2. Open .htaccess file from magento root directory and uncomment below code by removing #

    #   SetEnv MAGE_MODE developer
    
  3. Manually from app/etc/env.php

    Open file Magento/app/etc/env.php and find

    'MAGE_MODE' => 'default'
    

    and change it to

    'MAGE_MODE' => 'developer'
    
0

we can enable developer mode

Goto app/etc/ and open env.php

and change current application mode by 'MAGE_MODE' => 'default' to 'MAGE_MODE' => 'developer'

1
  • php bin/magento deploy:mode:set developer
    – MagenX
    Commented Jul 3, 2017 at 7:37
0

There are probably some generated files in var/generation and pub/static that you don't have permissions to delete. When switching to developer mode, Magento removes existing generated files and will regenerate them on the fly. Make sure that your user has write permissions for var and pub/static. Do not delete the whole directories manually because at least the .htaccess files must be present in developer mode and they will not be regenerated.

Read more about permission setup in the docs: http://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html

0

Here is the simple and easy way to Enable Developer Mode in Magento 2.

Run the following line of command.

bin / magento deploy : mode : set developer

That's it.

You can also check your current mode by running this command.

bin/magento deploy:mode:show

It will display a message like this.

Current application mode: {mode}
-1

Follow these steps to set the developer mode manually:

  1. open app/etc/env.php

  2. Set 'MAGE_MODE' to 'developer'

1
  • php bin/magento deploy:mode:set developer
    – MagenX
    Commented Jul 3, 2017 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.