[wp-trac] [WordPress Trac] #33161: Create a standard for defining and identifying site environment

WordPress Trac noreply at wordpress.org
Tue Jul 28 21:44:01 UTC 2015


#33161: Create a standard for defining and identifying site environment
--------------------------------+-----------------------------
 Reporter:  krogsgard           |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  4.2
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 There are a number of reasons I can think of that would make a site
 environment identifier quite handy.

 What I'm proposing: The ability to potentially define and/or identify a
 site environment, i.e., `local`, `development`, `staging`, `live`.

 For instance, if it were a constant, then it could be defined:

 `define('SITE_ENVIRONMENT', 'live');`

 Third party solutions like Mark Jaquith's `WP_LOCAL_DEV` are already
 popular, but this would be in core and include more environments.

 I know that adding constants isn't popular, but this could also allow core
 as well as third party plugins and themes to remove code that attempts,
 often not that well, to determine the same kind of information. A
 definition in the site's config could help make that easier and more
 accurate.

 I don't know if a constant is the best route for enabling the definition
 and identification of the site environment, but I'd like to start a
 conversation.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33161>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list