Few days back, I got a mail from one of our avid readers and a friend stating an error he encountered whenever he tried uploading media files on his wordpress blog.
In fact, below are his exact words.
“Hi Oscar long time, I know you are good.
Pls am having issues with my wp if I want to upload an image from my computer inside a post the image will not upload and here is the error msg i get.
Unable to create directory wp-content/uploads/2013/11. Is its parent directory writable by the server?
And coupled with that, I noticed that my post of 3 days disappeared from my blog. Please how can i resolve all these”
I decided to make a quick tutorial that would guide you through fixing this wordpress issue.
Solution 1: Changing Upload Folder Permissions
If you enconter the above stated error while trying to upload media files, most times it’s as a result of you or a script tampering with the upload’s folder permission settings in File Manager.
All you need do is log in to your File Manager (from cPanel), navigate to the wp-content folder (public_html/yourblog.com/wp-content), then change the permissions settings to 775 and try uploading from wordpress again.
If the above permission setting does not work for you, try changing it to 777 and try your upload once more.
Also check out the wp-content/uploads directory and make same changes while trying uploads to see if it fixes the problem.
There are situations where this is not the cause of the wordpress upload problem, then you’ll have to change the wp-content and wp-content/uploads folder back to the default 755 permission settings and move on to the next possible fix below.
Solution 2: PHP Safe Mode or No More Disk Space
Most times, you might be running your script (WP) in PHP safe mode and this does not allow the upload of files to your server. To easily fix this, contact your webhost.
Another factor that can cause this is when the disk space allocated to you by your host has been used up, and as a result you are locked out by your host from uploading more files to their servers
To fix this, contact your webhost and let them know about the problem, they’ll most probably ask you to upgrade your hosting plan and that would easily save you from the wordpress “Unable to Create Directory Error”.
And lastly, to the reader who sent in this mail. I guess the second option would work for you since you stated that your post was also deleted. This must have been as a result of your disk space been used up. Contact your webhost as soon as possible and let us know what was the outcome.
Feel free to let us know which of the proffered solutions above did work for you using the comment box below.
Thanks for finding time to read through this guide. Cheers.