I’m having some issues with setting the upload directory - it seems WordPress defines UPLOAD
in relation to ABSPATH
, so I can’t set the upload directory to /app/uploads
. It only gets set in relation to /wp
, so /wp/app/uploads
or /wp/wp-content/uploads
. Anyone else have this problem?
Shouldn’t need to set anything. I just cloned Bedrock and installed WP and uploaded a file, it was placed in http://bedrock.dev/app/uploads/2014/01/example.jpg
@benword is correct that if you want the default app/uploads
you don’t need to change anything. But if you DO want to change the path to something else, the normal UPLOAD
constant isn’t enough. You need to do something like this mu-plugin: https://gist.github.com/swalkinshaw/6400708
Only upload_path
and upload_url_path
are relevant.
My bad, was an old setting in the DB.
Out of interest, where is the upload directory configured in bedrock?
It’s located in app/uploads
.
Ha! No, I mean, where is the actual configuration? I can’t see it in application.php, although i can see that the WP_CONTENT_DIR is set there.
The uploads folder is automatically set relative to the WP_CONTENT_DIR. So wp-content/uploads
becomes app/uploads
, which in turn becomes shared/app/uploads
via the linked_files setting in composer.
Okay, got it, thanks…
…sorry to bring this one up, but I can’t seem to find an answer with Googling.
I used the gist suggested change upload folder and path and now my upload_path
is set to D:/sites/testsite/web/app/media
and upload_url_path
is app/media
but I get this error whenever I try to “upload” something on my development machine through the dashboard:
Unable to create directory D:/sites/testsite/web/app/media. Is its parent directory writable by the server?