Someone I know was having issued with their WordPress installation. Since I’ve been using WordPress for ages (about ten days), I figured I’d have a look. Plus, I was the only one that he knew with technical experience. And his blog URL was printed in a periodical that was due to be shipped in two weeks, so expectations were running a little high. Sweet.
Every time an image was uploaded the following error was encountered:
Unable to create directory /var/www/vhosts/domain.com/httpdocs/blog/wp-content/uploads. Is its parent directory writable by the server? |
I manually created the directory, and received a new error:
“The uploaded file could not be moved to /var/www/vhosts/domain.com/httpdocs/blog/wp-content/uploads” |
After some sleuthing, it seemed to be an issue with PHP Safe Mode being enabled for the entire domain. There is a lot of differing opinions on how to address turning safe_mode off or even if you can turn it off for individual directories or not.
I’ll spare you the details, but let’s just say I got an unexpected self-taught crash course in PHP. After spending all morning on the issue, I ended up having the web host turn it off for the entire domain (something only they could do on the backend). The problem still persisted.
I came upon the answer after I changed the keywords I was using in Google. It’s so simple, I almost didn’t post it here. However, I am the Nubby Admin so it’s not like anyone has high expectations for me.
Solution:
First create the wp-uploads folder in the wp-content folder. Then change the permissions on wp-uploads to 777. I’m sure there are other possibilities, but that seemed to be the most straight-forward way.
Hopefully the search engines will smile on this post and save someone a morning of phpinfo() and ini_set().




