Enter dev mode

4.1.0

how to enter dev mode?

I’ve seen this explenation of SS4 so i added a mysite/_config/app.yml file and added code below.

Only:
environment: ‘test’

SilverStripe\Security\BasicAuth:
entire_site_protected: true

Now when i check my Environment Type the way explained, i get “live mode” while it should be “test mode”.
Normally i could change this in my config.php file but it looks like that does not work anymore with SS4.

I hoop someone knows the answer. thanks.

The snippet you have there is to define configuration options which only apply in the test environment.
Everything after Only: is subject to the rules you specify.

The best way to get your site into dev mode is to add the following to your .env file:

SS_ENVIRONMENT_TYPE="dev"

Then make sure you flush the site with ?flush on the end of a URL

1 Like

Thank you very much that worked.

1 Like

As a note, you can also enter dev mode for just the current session by appending ?isDev=1 to your URL. To do this you must be logged in as an admin.