[wp-trac] [WordPress Trac] #33161: Create a standard for defining and identifying site environment
WordPress Trac
noreply at wordpress.org
Sun Jun 12 20:47:31 UTC 2016
#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 | Resolution:
Keywords: | Focuses:
--------------------------------+------------------------------
Comment (by Maelacuna):
What about incorporating dotenv?
https://github.com/vlucas/phpdotenv
This would avoid ever having to edit wp-config.php for configuration, like
database credentials, as well as giving the ability to define enviroment
variables for plugins, themes, etc. if desired. API keys spring to mind as
an example. These things can then be kept out of the code base, out of
version control, and even out of the document root if desired.
@Frank Klein - Item 3 of the 12 Factor app is specifically about storing
config in the environment and not in the code base, so I'm confused why
you reference it and then say you're not in favour?
Here is an article by Eric Barnes highlighting one way that dotenv could
be incorporated in to WordPress to help manage environments.
https://dotdev.co/tutorials/secure-wordpress-config-dotenv/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33161#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list