WordPress Core Upgrade File Ownership for Web Server User
0 reputation · 24 Sept 2022, 08:22 UTC
WordPress Core Upgrade File Ownership for Web Server User
WordPress replaces core files during an automatic or manual upgrade using the write access available to the web server process. The goal is to set the correct file owner and group so unattended upgrades can complete without falling back to FTP credentials or leaving a partially replaced file set.
WordPress core does not perform atomic file replacement, and a failed upgrade can leave a `.maintenance` file in the site root alongside mixed file versions. It is unclear whether ownership by the web server user is sufficient, or whether group write access is also required on wp-admin, wp-includes, and the site root for WordPress 6.x.
- What file owner and group should WordPress core directories use for unattended upgrades?
- Is group write access required in addition to web server user ownership?
- Does deleting .maintenance before confirming complete file replacement expose a partially upgraded site?