[wp-trac] [WordPress Trac] #62489: Make the .maintenance file location more configurable

WordPress Trac noreply at wordpress.org
Wed Nov 20 15:03:16 UTC 2024


#62489: Make the .maintenance file location more configurable
-----------------------------+-----------------------------
 Reporter:  jmdodd           |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 In some hosting situations, ABSPATH is not writeable and WP_CONTENT_DIR
 is. Plugins and themes can update but the .maintenance file is unable to
 be written in its hard-coded ABSPATH . '.maintenance' location. Because of
 the very early check for this file in the load order, substituting a
 similar behavior via mu-plugin is not quite as direct, and there are no
 appropriate filters to allow altering the .maintenance file location.

 We can resolve this by allowing a constant to override the initial path
 and using that if available (as would happen in cases where WP is
 installed with non-standard directory structures). A filter could be
 implemented for environments using  auto_prepend_file -- the
 wp_maintenance() check in wp-settings.php runs well before mu-plugins and
 plugins are loaded, so adding changes to a plugin defeats the purpose of
 moving the file correction up to the wp_maintenance() check.

 Falling back specifically to WP_CONTENT_DIR would work for my use case but
 may not be a general solution that would benefit other hosting
 configurations.

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


More information about the wp-trac mailing list