+44 (791) 5698 086

WordPress 2.8-3.0 file / image upload error fix

While uploading the image to the gallery on WordPress 2.8, i found out that it was giving me this error:

Unable to create directory /the/path/here/.

Is its parent directory writable by the server?

This can be caused by some misconfiguration, including shifting the blog server or directory.

The solution to this issue is simple:

Goto Settings -> miscellaneous

and change what ever value is there in for: Store uploads in this folder to wp-content/uploads

You can notice that on the same page, just in front of that input box, WordPress also says that default is wp-content/uploads

Hope this solves the issue of error saying that the parent directory is writable or not by the server when uploading image file or other file to the media directory.

EDIT 1: Please note, that when you add “wp-content/uploads” you donot write the slash in the begining like “/wp-content/uploads”.

Also, there is upgrade version 2.8.1 for WordPress is available, it includes fixes to many issues already, so try upgrading it first and then see if the error still presists. You can find the post for upgrading your WordPress in the WordPress section.

EDIT 2: (see the edit 3 below before going for this one) If the above does not fix the problem, you need to confirm this:

Goto your site root > wp-content

Check if there is a folder named uploads

If you cannot see the folder, then simply create new folder to it and name it uploads.

Try uploading the image now, if it still doesn’t work then give permissions for this folder uploads to be 777.

If this does not solve the issue , and the uploads folder already exist, check if there is folder named 2009 in it.

If it does exist then simply give permission 777 to all sub folders in the main uploads folder.

Make sure that you return the value to 755 once you have worked on it. For solving this for long term , see the edit 3 below.

Hope it solves the issue.

EDIT 3: User wafwot mentioned this fix and mentioned that it is checked, so try this before attempting to set the permission to 777:

Disabling PHP safe mode will allow the apache user to create subsequent year and month subdirectories in uploads with “Organize my uploads into month and year-based folders” checked. No need for world-writable directories.

If you dont know how to disable safe mode, ask your hosting provider , or post here if you need help about it.

40 Responses to WordPress 2.8-3.0 file / image upload error fix

  1. Tan

    HI there, I tried doing this and it was already set correctly to wp-content/uploads and it still says the same error. any other ideas you may have would be greatly appreciated!
    thanks!

    • Nabeel

      hello tan,

      please make sure it is “wp-content/uploads” and not “/wp-content/uploads

      waiting to know if it was still not solved.

  2. Nabeel

    also make sure first that your directory “wp-content/uploads” is writable too! check the permissions to be 777

  3. Kris

    Nabeel . seriusly, who many times are people like you gonna say “check the permissions to be 777”?

    Are you aware that it leaves the server WIDE OPEN to attacks? you make it possible for people REMOTELY to create and exechute scripts…

    • Nabeel

      i appreciate your view sir, but :

      1. take it more like, that “check by changing your permissions to 777, to see if that was causing the problem” or “change the permission to 777 when uploading the files”

      2. changing it to 777 does not mean it is absolutely underattack. It depends upon your server configuration.

  4. Tan

    hello! yes, it was fixed. thank you for your tip! i just change the permissions back after i make changes to that path in order to make sure it’s secure. your post was very helpful!

  5. Vishveshwar Jatain

    Thanks a lot, worked like magic!

    • Nabeel

      i am glad jatain that it worked for you :)

  6. mimibook

    Thanks so much Nabeel, I have been searching for the solution for so long . I am a kind of slow in this kind of stuff but you clear explanation made me changed the permission myself-don’t have to ask for help from others. And I changed it back to 755 also.

    Thank you very much again.

    • Nabeel

      its really a pleasure to know that its helpful for all you guys!

  7. Oscar

    Thanks… It`s work :)

    • Nabeel

      i am glad it did.

  8. wafwot

    Disabling PHP safe mode will allow the apache user to create subsequent year and month subdirectories in uploads with “Organize my uploads into month and year-based folders” checked. No need for world-writable directories.

    • Nabeel

      thankyou warwot for update! i really appreciate that! i have updated the article with your update! thanks again!

  9. notsheeple

    I never had this problem with 2.7, only after I upgraded to 2.8. I used the 777 fix and within a week my website was hacked by “turkish muslims” accusing American’s of “baby killing”. I had to erase everything from my site and start over from scratch. After re-installing the latest version of wordpress I am getting the same error. My permissions are set at 755, and will stay that way. There must be some other way of fixing this problem. I am a novice at this sort of stuff, and just want to focus on my blog and not all these technical problems.

    Help! I mean real help and not get my website hacked again help. ;)

    • Nabeel

      please ask your server people to turn off safe mode on your account. Also if you need any commercial support in securing your site, do let me know.

  10. creativeunit

    Thanks Nabeel. This worked – I did have to put the entire string of the folder address in, but got it to work great after that.

    • Nabeel

      i am glad that it worked for you

  11. Harry

    Hello guys,

    The problem is that: when my wordpress create a folder automatically (for example the folder por the pictures for the new month), this folder is created for de USER:APACHE, so WordPress have the problem to upload my pictures, and then I have to delete de folder an create again. What can I do?

    harry—–(at)hotmail.com (email edited by admin to avoid spam to the user)

    This happend after I change hosting.

    Thanks.

    • Nabeel

      are you sure that the hosting transfer was successful? and you made all changes in the db and configuration file?

      also can you please give more details of your host? this would be helpful.

  12. Harry

    Hi Nabeel,
    Thanks to answer, I’m not sure, because the people from the hosting made the change, and everything is ok, only this problem. In my previous hosting, I used DB_HOST: “locahost” in my configuration, but in the new hosting, they change this to a new DB_HOST: “clud001.****.net”, This is the only change.

    Notes:
    I use Plesk Control Panel.

    Thanks.

    What other details do you need?

    • Nabeel

      i dont have a plesk panel currently, so cant check it, but if you want to fix the issue with folder permission for long, you can uncheck the “organize my uploads in months . . .. . ” in the settings > miscellaneous. this way it will not create new folders every month or so. But if you have some large image data every month, then its better to organize it. i can try to fix it if i get hold of plesk server.(also let me know if you are interested in commercial support from me)

  13. HAPPY!

    Thanks Nabeel, I have tried every-which-way, and all I was missing was the “uploads” folder.

    (here’s what happened in case it can help someone):
    After trying all the code edit tips and tricks, I started to get a lot of error messages, so I just backed up my “themes” folder, deleted the whole wordpress directory (not the index.php and wp-config.php which is outside of the wp dir) and re-installed it (wordpress). I created a new upload folder like you described (wp-content –>uploads) and set the permission to 7777 via FTP.

    Tank you so much for your help!! Could not have done it without you!

    • Nabeel

      i am glad that it worked for you sir!

      Please note, although this method surely worked for most of the people, it is stated that it might lead to some security issues in some circumstances, so it is preferred that you discuss it with your hosting provider, they might come up with any long term solution, till then, you can continue with this fix, but while keeping complete backup of your wordpress, including files and database.

  14. Nabeel

    Walaikum-assalam Jamal, i am glad that it worked for you and thanks for your appreciation. :)

  15. Jamal Mohamed

    Assalamu Alaikum ,
    Your Idea Works great,I appreciate your help and leaving reply to all commenters

  16. jacob

    Thanks nabeel for this.. helped me out a lot!!

    • Nabeel

      Hello Jacob, i m glad that it was helpful to you in solving your wordpress image upload issue! :)

  17. Nabeel

    Не беспокоит?

    [English: not worried about?]

  18. Белов

    Меня это не беспокоит.

    [English: I was not worried.]

  19. Rit

    Thanks so much! This really saved my life!So all those permission settings changes that people had suggested were unnecessary.

  20. Nabeel

    @Rit i am glad that it worked for you too.

  21. Jac

    Thanks a lot bro … it was always there …the path … yet we missed it!

    • Nabeel

      i am glad that it was helpful for you sir! :)

  22. Khaled Elsehsah

    2 thumbs up. Thanks Muhammad.

  23. Nabeel

    You are welcome khaled!

  24. Mayank Dhingra

    Thanks a lot buddy !!

  25. Nabeel

    @Maynak Dhingra, you are always welcomed dude! btw! we have a course book by and author named Dhingra! :D

  26. Faria Lima

    Hosted by DreamHost, they moved my WP install to another server, and your advise saved me in 1 second. Thank you !

    • Nabeel

      @Faria, i am glad that it was of some use to you!

Leave a Reply

Your email address will not be published. Required fields are marked *

Who are we?

Nabtron team includes web, desktop software and mobile apps developers along with SEO professionals.

We are available 24 hours, 7 days a week. Contact us now for anything you need!

Join our mailing list

Lets become friend :) What's your name & email?