9 • 16 • 22 natesymer
If there's one pain point in using WordPress, it's the lack of separation between content and configuration/code. While its usually plugins and themes outside of wordpress core that are guilty, WordPress core itself is also guilty in one crucial area: updates. Let me explain:
Whenever a user with Administrator privileges updates core or installs/updates plugins/themes, code is downloaded to a temporary location in the form of an archive, extracted to a temporary location, and then copied into the appropriate place inside ABSPATH
. This wouldn't be an issue, except this is WordPress and there's always some vestige of a legacy version that adds complexity/difficulty. In this instance, it's the wp-content/upgrade/
directory inside ABSPATH
that WordPress extracts archives (that it already downloaded to /tmp
!) to. In these days where /tmp
is often in RAM and filesystems can be shared/distributed and/or remote, this makes no sense at all (in fact, I developed the solution you'll see further down the page for a hosting environment I designed and implemented).