[wp-trac] [WordPress Trac] #23269: .maintenance location issue on symlinked install
WordPress Trac
noreply at wordpress.org
Fri Feb 21 23:38:41 UTC 2014
#23269: .maintenance location issue on symlinked install
-----------------------------+------------------------------
Reporter: WPsites | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.5
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
-----------------------------+------------------------------
Comment (by dd32):
`ABSPATH` really seems like the safest option to me.. but in a symlinked
install, as noted, it's not ideal.
`WP_CONTENT_DIR` could be shared with another install, `WP_PLUGINS_DIR`
could be shared, and it could even have a shared themes directory. As much
as one might expect that to be rarer than `ABSPATH` being shared, I
suspect it might actually happen more often than expected and may cause
unintended side effects for some people.
Multisite also has issues with the `.maintenance` file as it can take down
the entire instance while upgrading a theme active on only one site.
The other option, is that we store a maintenance file alongside the `wp-
config.php` file, as that should be unique per site, or so you would
think, but it's also possible to have a single wp-config.php file shared
amongst multiple WordPress installs (in subdirectories).
So by this point, you're probably seeing what I'm thinking here, every
option has a downside to it.
Another option is that we keep it in `ABSPATH`, but instead of just
writing `$upgrading = time()` to the file (which I think is what we do) we
also write a site-identifying string to it, for example, `$site = DB_HOST
. DB_NAME . $table_prefix;` which we can then check on pageloads that find
the file existing. I'm not sure this is a sure-way of doing it either, but
it would also open the door to fixing the Multisite issue where we'd just
define what's upgrading (`core`, `plugin:akismet/akismet.php`, `theme
:site-specific-theme`).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23269#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list