Closed ttodua closed 1 month ago
See https://github.com/docker-library/wordpress/issues/6#issuecomment-51536740 -- in short, the whole of /var/www/html
is the "WordPress-managed" directory. On initial container startup, we copy /usr/src/wordpress
into it, and then it's expected that WordPress manages it directly via auto-update / updates through the UI. There are other issues that describe how to circumvent that behavior if you'd like a more "traditional" container experience where WordPress is updated via container redeployments, but I really cannot recommend that (those WordPress auto-updates are your primary line of defense against WordPress security issues).
As for why that specific directory, see the php
image we're FROM
for details (that's the default directory over there for both Apache and FPM variants).
Thanks for reply!
I am about this line: https://github.com/docker-library/wordpress/blob/bd76dc3a667476fb94b7e6d10cfafb0aba40cc38/latest/php8.2/apache/Dockerfile#L172 should there be
/usr/src/wordpress
instead of/var/www/html
, or is that intentional? if so, why does it volume that directory, if that dir is nowhere referenced/used in DOCKERFILE or entrypoint