Custom uploads directory permissions error
-
I’m using MAMP and a custom directory structure:
– index.php
– content (renamed from wp-content)
– app (wp-config, wp-includes, wp-admin… and all the rest)
– media (a renamed uploads folder)Everything is working great, except uploading images.
If I manually create the year/month folders however, then it works.
The error given is “
Unable to create directory ../media/2025/02. Is its parent directory writable by the server?
“, which makes no sense as directory permissions are fine, and if I leave the directory structure vanilla I don’t get such permissions errors.So it seems WP can’t create the year/month folders.
The upload url / path fields in the wp-options table are blank (why do these rows exist anyway, when we set the directory in code in wp-config?).
Here is my wp-config:
define ("WP_CONTENT_FOLDERNAME", "../content");
define ("WP_CONTENT_DIR", dirname(__FILE__) . "/../content");
define ("WP_CONTENT_URL", https://localhost:8888/test/content);
define ("FS_METHOD", "direct");
define ("FS_CHMOD_DIR", 0755);
define ("FS_CHMOD_FILE", 0644);
define ("WP_TEMP_DIR", dirname(__FILE__) . "/../media");
define('UPLOADS', '../media' );
- You must be logged in to reply to this topic.