[wp-trac] [WordPress Trac] #51064: Consider adding "local" as environment on WP_ENVIRONMENT_TYPE

WordPress Trac noreply at wordpress.org
Mon Aug 24 15:41:03 UTC 2020


#51064: Consider adding "local" as environment on WP_ENVIRONMENT_TYPE
----------------------------+---------------------
 Reporter:  claytoncollie   |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  5.5.1
Component:  Bootstrap/Load  |     Version:  5.5
 Severity:  normal          |  Resolution:
 Keywords:  2nd-opinion     |     Focuses:
----------------------------+---------------------

Comment (by TimothyBlynJacobs):

 > the example from @Ipstenu perfectly outlines a usecase none of the other
 scenarios would account for.

 I disagree that a `local` environment type can solve that use case.

 > so remote calls should not happen. This is like dev, only _potentially_
 offline.

 Because this is only potentially offline, I don't think it is a useful
 distinction. For instance, I would anticipate any local development
 environment, mamp, Local, etc... would set `local` as the environment
 type. It would be wholly unexpected that remote HTTP requests stop
 working.

 I think this is better served using something like
 [https://wordpress.org/plugins/airplane-mode/ Airplane Mode].

 > Isn't this what WP_LOCAL_DEV is for?

 Of note, `WP_LOCAL_DEV` is really only used by Jetpack:
 https://wpdirectory.net/search/01EGGHQXTKT0BSFN4DXRC7JA3Y And hasn't been
 really announced as an official feature of WordPress Core, though it is
 now included by way of Site Health.

 > I want to have a unique index name for local, dev, staging, and
 production so that I am not overwriting data from another install.

 I don't think using the environment type is the correct thing to do here.
 That is using the environment ''type'' as the actual environment/instance
 the site is running on.

 > writing out what these classifications mean would be a huge benefit I
 believe, and @batmoo has some good examples that could be built on.

 💯

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51064#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list