Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP_CONTENT_DIR outside ABSPATH #51

Open
franciscof5 opened this issue Jan 23, 2024 · 3 comments
Open

WP_CONTENT_DIR outside ABSPATH #51

franciscof5 opened this issue Jan 23, 2024 · 3 comments

Comments

@franciscof5
Copy link

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

@TrafeX
Copy link
Owner

TrafeX commented Feb 10, 2024

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?

@franciscof5
Copy link
Author

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

@TrafeX
Copy link
Owner

TrafeX commented Feb 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants