studio icon indicating copy to clipboard operation
studio copied to clipboard

WP_ENVIRONMENT_TYPE is unset / i.e. set to "production"

Open bacoords opened this issue 1 year ago • 0 comments

Quick summary

If you run wp_get_environment_type(); you'll see that because it's not set, the environment type is production. Just asking if it makes more sense to set WP_ENVIRONMENT_TYPE to local` by default for Studio sites since they are on a local environment.

(I would also consider setting WP_DEVELOPMENT_MODE to 'theme' or 'all', if the intended user is going to be building/updating custom themes, but I can understand if that's not the target audience or too opinionated.)

https://developer.wordpress.org/reference/functions/wp_get_environment_type/

If this ends up getting closed, users can always update their environment type by running wp config set WP_ENVIRONMENT_TYPE local or updating the wp-config.php file.

Steps to reproduce

  1. Check wp-config or use wp-cli to check the environment type value

What you expected to happen

The environment type is local

What actually happened

The environment type is production

Impact

One

Available workarounds?

Yes, easy to implement

Platform

No response

Logs or notes

No response

bacoords avatar May 24 '24 15:05 bacoords