• Hi,

    So I’ve recently moved the files of this site to the live domain and I can do everything but upload media. I have tried changing permissions to 777, checked the options folder in my database for the wrong directory and even tried to uncheck the option to organise files into month and year folders but have had no luck. At first the upload progress bar didn’t move and now it is loading the whole way through and then showing this error:

    Unable to create directory wp-content/uploads/2013/06. Is its parent directory writable by the server?

    I have no idea what else to do and this is driving me nuts!

    I have had to include the permalinks code into my .htaccess file to run with %postname% and am wondering if maybe there is something more I need to add to this file?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You shouldn’t need anything in the .htaccess file.
    This should be rectified by changing the permissions. When you changed these, did you change the permissions on the uploads folder or that specific month? I would try to change them on the uploads and then set apply to add sub-folders.

    You could also ask your host. They might be able to see if there’s anything on their end they could do.

    Hi, I’ve just had the same issue on a couple of my blogs. I read the usual chmod 777, alter .htaccess file posts and NONE of that is required. I’ve finally cracked it and confirmed it on a couple of my broken blogs. It’s an EASY fix! In your blog go to Settings > Media and if it shows Store Uploads in this folder line then the path specified is wrong causing the error. Underneath it will also show ‘Default is wp-content/uploads’. So just change that line to be wp-content/uploads and Save and then your plugin, image or theme upload issue will be fixed.

    I fixed this problem with a completely different solution. I hope my experiences will help those struggling with the same issue.

    A little background: We recently moved our site from one GoDaddy ‘hosting’ platform (and host) to another. GoDaddy moved the whole site to the new platform, and confirmed that the new site was working (sort-of). I later found that I simply could NOT upload any new media files.

    I kept getting the ‘Directory cannot be created, check that you have ‘write’ permissions to the parent-directory’ message’, whenever I attempted to upload a file.

    All the Googling I did kept suggesting that I change the wp-Content directory file permissions, and I did that; as well as the ‘uploads’ directory permissions — all to no avail. I key getting the same error message.

    Finally, I called GoDaddy. They were friendly, and TRIED to be helpful, but all they did in the end was check and change the same file-permissions that I had already diddled with. They confirmed the error was there, but were at a loss as to how to fix it. They suggested that I Google the problem, and try multiple solutions based upon anything I found.

    What I did, was Google ‘wp_upload’, and got the CODEX entry for that function. Then I wrote a little ‘tester’ code to dump the values of the array the wp_upload_dir() returns. This link shows my results: Tester Results. I’ve removed the domain name to keep it genric… but you get the idea.

    This revealed what I had suspected: the upload directory that WP was attempting to use still pointed to my old (defunct, and now non-existent site-server), instead of the new server path!

    The fix was trivial. I just need to add a line to wp-config.php:
    “define(‘UPLOADS’, ‘wp-content/uploads’);”.

    This line needs to be added right before the line that reads “require_once(ABSPATH.’wp-settings.php’);” — of coarse you can remove the double-quotes. I got the mechanics of this fix from: Sarah Gooding’s article.

    Once applied, this fixed the entire problem, and my tester conformed that the correct paths were now being used. It had NOTHING to do with file permissions!

    It seems that prior to WP 3.5, users were able to set the UPLOADS directory in a ‘Settings’ field, but this field is no longer present in WP 3.5+, and the ‘UPLOADS’ constant is normally only set at ‘install time’. So when the site was ‘moved’ to a new server, my uploads directory was left pointing to a legacy (now defunct) value. Adding the line above to wp-config.php restores the value to a present (good) path.

    Thanks @gordonbland2013 you rock!! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to upload media – Is its parent directory writable by the server? error’ is closed to new replies.