[wp-trac] [WordPress Trac] #38204: enhancement: custom pathname to wp-config.php

WordPress Trac noreply at wordpress.org
Sat Oct 1 16:12:40 UTC 2016


#38204: enhancement: custom pathname to wp-config.php
-------------------------+------------------------------
 Reporter:  gdamjan      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by gdamjan):

 A bit of discussion:
 if I posit that an application has:
 * code (typically in /usr)
 * configuration (typically in /etc)
 * persistent state (typically in /var)
 * ephemeral state (typically /tmp)

 all of those parts has different lifecycles and permissions:
 for example, we never need to backup /usr since that can be retrieved from
 upstream (either github release, or distro packages). /usr also can be
 read-only (a ro filesystem, or just in relation to the user that's running
 the application). and can be shared between users.

 configuration needs to be backed up, be writeable to the admin, but not
 readable to other users, and typically not writeable to the application

 persistent state is images, uploads and the database, needs to be backed
 up regularly, is read-write for the application, but not readable to other
 users.

 ephemeral state are caches, sessions, temporary uploads and similar, can
 be cleared by the sysadmin at any time, doesn't need backups. Typically
 this will be /tmp in tmpfs (and with systemd can be a PrivateTmp, so I
 don't care to configure it in wordpress), needs to be read-write to the
 app but not readable to other users.


 with {{{WP_CONTENT_DIR}}} we already can setup the persistent state
 directory outside of the code directory. this patch allows for the
 configuration to be outside of the code directory too.

 this makes the code directory easier to share between wordpress instances,
 each running as a separate user, also makes updates easier - just replace
 the code directory.

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


More information about the wp-trac mailing list