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

WordPress Trac noreply at wordpress.org
Mon Aug 24 16:09:14 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 markjaquith):

 Replying to [comment:7 TimothyBlynJacobs]:
 > I think it'd be helpful to give examples of how plugins should behave
 differently between when a site is in "local" and "development".

 1. Using an image CDN like Jetpack/Photon (used on development, but not on
 local, because you cannot). This is different from an offline situation. I
 am online, but my local site is not accessible on the public web.
 2. Talking to Cloudflare (purge after update type stuff, Cloudflare Worker
 communication code, etc). You want to test this on dev, but again cannot
 run it locally because Cloudflare isn't proxying to your local site.
 3. Enabling dev plugins only on local. Yes, you could also run these on
 development, but you might want to only have the hardcore tools (Query
 Monitor, etc) active locally, and use development as a final developer
 check of running on production-esque hardware, but before you've pushed it
 out to the staging server that non-devs use to verify new functionality
 before deployment to production.
 4. You might not have access to certain resources locally, like
 Elasticsearch.
 5. You might not store a copy of production images in the local clone, and
 might want to transparently fetch those missing images from production for
 local development, but do that on your public-web development server.

 Some of these are things that a plugin author could make intelligent
 decisions about. Jetpack already changes functionality on local sites. A
 Cloudflare/Varnish purge plugin could do the same. And then other plugins
 could allow the site operator to decide, or they could leverage it in
 their own custom code.

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


More information about the wp-trac mailing list