WordPress upload fail – unable to create directory…


Error Message: Unable to create directory … {long directory path} … Is its parent directory writable by the server?

Cause: I recently changed hosting services so when I migrated my blog over to the new server everything worked great except for my WordPress uploads. Most things in WordPress are kept relative and ask the server where things are but the path to the upload files are kept in the database so if you change servers without changing the database string pointing to the correct directory you will get an error and probably frustrated also.

UPDATE 05/25/09

Thanks to a comment from Matt Lindsay I now realize that there is a much easier way to update the wordpress upload string in the database than digging into the actual database. A big thanks goes out to matt for making my blog better. ; )

Quicker and easier fix

  1. Login to your WordPress Admin
  2. Go to “Settings”
  3. Select “Miscellaneous”
  4. Put the correct path in the input field labeled “Full URL path to files”
  5. Save the changes and you should be done


The advantage I had in digging into the database is that when I switched hosting services only one of the folders in the path changed so I went in and just modified the one folder. This is nice if you don’t know the exact file path from the server root like me. ; )

Older more complicated fix:

  1. Login to your database for the WordPress blog.
  2. Browse/ view tables in the database created when setting up the blog
  3. Browse/ view table named “wp_options”
  4. In the “option_name” column look for “upload_path” (was #60 for me)
  5. Edit the row values and change to the correct path
  6. Save changes


After making that change the problem should be fixed and uploading will now work. If this helped be sure to give me a shout and leave a comment. Best of luck to you. ; )

I figured this out all on my own. ; ) #HappyGeek

Published by


I am a Geek! I hope you enjoyed this recent post.

13 thoughts on “WordPress upload fail – unable to create directory…”

  1. Hi Mike
    Thank you for your comments on my blog, and another thank you for the tip on how best to link up the links {does that even make sense?!!} I am definitely looking up on it.
    I have browsed your blog for a few hours now and I have learnt quite a lot that I didn’t even give thought to previously, now to see how I can improve my blog and move it along a little with what ive learnt! Thank you!!
    Have a great weekend


  2. Change the settings for “Uploading Files” in Settings->Miscellaneous Settings. Set “Full URL path to files “ using the the full URL path. Make the default setting. Should be next to input field, make it the same.

  3. @ Mike: My pleasure mate. I wasn’t sure I was making sence :) Anything that makes all this ‘technobabble’ easier to understand for ‘anyone’ especially me, is definitely valuable. Congrats on your site. Nice resources. I’ll be back. Cheers.

  4. Thanks! Your post helped out! I’ve been uploading images and entering the link manually. Such a hassle. Gonna follow your blog now!

  5. @Brett, You are welcome! I am glad that I was able to help. Putting images in a blog post the way you were sounds really tedious and a big pain. When I wrote about my troubles and how I fixed it, I really didn’t think many people would find it useful or find it at all. Turns out I was wrong. This is one of my most popular posts.

    Being able to help others is the biggest reason I love to blog. Thanks for following my blog and I will see you in the twittersphere. : )

  6. If you tryed everything and upload in your wordpress still doesn’t work – i have an answer for you. In short: php safe mode won’t let you create files or directories if your php scripts and upload directory belongs to different users. So there are 2 possible solutions: either disable php safemode (not recommended), or change an owner of scripts and upload directory:

    cd blog_root
    chown -R apache:apache *

    Complete description available here: http://tamkovich.com/2009/09/unable-to-create-directory-wp-content-uploads-is-its-parent-directory-writable-by-the-server/ (in Russian)

  7. WOW – thanks man. It saved my life. I have been trying to solve this problem from a long time & everybody on whole internet & even on WordPress.org just says “Change permissions to 777” CRAP!!!

    But this really worked. Thanks a lot. Lovely post

  8. Hello Everyone, i did everything suggested above still unsuccessful, help me it’s getting really big headache for me

Comments are closed.