When I want to upload a file to my WordPress blog, there was an error shown on the Media page like in the image above.
“facebook.png” has failed to upload due to an error
Unable to create directory /home/OLDPATH/public_html/BLOG/wp-content/uploads/2011/03. Is its parent directory writable by the server?
Supposedly there should be no problems because I have successfully uploaded many files before. After awhile I remembered that a few days ago I moved the blog to another server. There might be some configurations that I missed to change.
So I go check the settings at Settings > Media and I found the culprit under Uploading Files.
The path to the uploads folder is wrong. So I entered the correct path and now it is working correctly. Make sure you put the full path to the uploads folder like this:
/home/NEWPATH/public_html/BLOG/wp-content/uploads
Hope this helps! ๐
Alternatively (Easiest Method)
Just use the default path.
wp-content/uploads
Thanks to Mick Genie for the tip. ๐
The same error happened with me when I moved my server.. It took me one hour to find the real cause.. such posts are really helpful …I hope you should have published this post sometime back.. Could have saved my 1 hour.. Though I’m sure many others are going to find it really helpful…
Thank you for your comment Harsh. I also hope my readers will find it useful when they have this kind of error on their blog.
Normally you may use the default setting of wp-content/uploads as it will detect the physical path of your WordPress installed.
Otherwise, remain your home user path as old account setting.
Yeah, thats right. It is easier if just use wp-content/uploads. Thanks! ๐
Yeah. Like Cypherhackz said. wp-content/uploads is a lot easier. I tried doing the public html/…. thing but I kept getting the same error. Changed it to wp-content/uploads and boom it works.
Many thanks!
You answered my prayers after 4 hours of head scratching and crisis calls to my brother.
Lots of love to you. I’m a happy man.
Hi cipherhackz I tried doing it but it didnt work for me
Under settings -> media -> store uploads in this folder I put Library/WebServer/Documents/wordpress/wp-content/uploads. I also tried /Library/WebServer/Documents/wordpress/wp-content/uploads but it doesnt work.
Im new to wordpress and not sure If I have installed it properly. Its runs on localhost.
Thanks for your help
Have you tried just put “wp-content/uploads” in the field?
I have tried with mine, but its not working. I have even tried with wp-content/uploads yet it dosent work.