WP_CONTENT_DIR outside ABSPATH
Hello, Trying to understand why set WP_CONTENT_DIR outside ABSPATH, because it is not working well, the file uploads keeps sending files to /usr/src/wordpress/w-content
not
/var/www/wp-content
Hi @franciscof5 ,
It's because the WordPress source is on a different location than the wp-content folder. That makes it possible to update WordPress in this container without affecting the things that live in in wp-content. I don't know why this is an issue for uploading files. It works on the WordPress websites where I'm using this Docker container. How are you uploading the files?
I think if you try an to use the image instead of building the project it will not work properly (I am running multiples wp, so it safe a lot of disk space), for me I have to set the volume as an absolute path:
image: trafex/wordpress
volumes:
- /var/www/PATH/PATH/wp-content:/var/www/wp-content
The absolute path you use in the docker compose config doesn't have anything to do with the ABSPATH constant. In docker compose you can use a relative path, but when you use Docker directly it always requires an absolute path.