WordPress error- Is its parent directory writable by the server?

Been using WordPress now for about 4 months on my projects and I occasionally find problems with plugins and themes but not on WordPress itself. I seem to be getting good at troubleshooting some.

Yesterday my host changed servers, then I upgraded to the latest version of WordPress and everything got whacked on uploading images in the admin with this error.

Unable to create directory /home/username/public_html/wp-content/uploads/2008/05. Is its parent directory writable by the server?

Most people encounter the error after upgrading WordPress or changing servers

Here are troubleshooting steps you can do.
1. With the error above, it can be assumed it is a permission problem with the folder. Default is 755, With your FTP software or WebFTP, edit the uploads folder in the wp-content to 777. Then try again.

2. If that doesn’t work, it can be an ownership issue. Wherein the owner of the files is apache and not your user account.

If you have access to SSH, you can edit the file to change ownership to

chown -R username:apache_user /home/username/public_html/wp-content/

username:apache_user for me is the ftp account, others are different.

3. If this doesn’t work. Check the upload path in the admin – Settings – Miscellaneous and make sure it is wp-content/uploads sometimes the upgrade or server move changes it to the absolute path.

The 3rd solution worked for me. Hope you find this useful

28 thoughts on “WordPress error- Is its parent directory writable by the server?

  1. Wow thank you!

    Finally someone who explained the problem in a easy to understand way.

    I owe you a favour – shoot me an email if you need any socail media help.

    Thanks again

    Danny

  2. Nice site and information……Few days ago one of my WP article directory site was not working well with its additional plugins……Do you have any idea…….why did this happen?

    Now all are normal……but few of my submitters took u turn………I found this site informative….so looking for someone…..who will response this problem.

    Happy Chinese New Year though.

  3. check if your web server has php safe mode disabled. if it is turned on, the upload will fail even if the file permissions are set correctly.

  4. In my one website i have same problem: “Unable to create directory /home/username/public_html/wp-content/uploads/2009/01. Is its parent directory writable by the server?”

    These type of error you can solve by below steps as per my experience

    – First pass 777 permission to WP-content & also too upload folder and its sub folder
    – Then moves to your admin section where you can find setting option, in this section check “Miscellaneous’ for uploading path ( This is the main problem please check it again)
    – After this please create folder which are mention in your error. as per above mention error i have to create “2009? and also a subfolder with name “01?
    – Now try to upload image…

    Best Luck!!

  5. Wow, you are amazing. I totally forgot about there being a setting for the upload path. I was having way to much trouble… sometimes things are simpler than they seem.

    Thanks so much =]

  6. If you’re on a Plesk server with RHEL, the following should work (and preserve security):

    mkdir wp-content/uploads
    chown -R apache:apache wp-content/uploads
    chmod -R 744 wp-content/uploads

  7. In my one website i have same problem: “Unable to create directory /home/username/public_html\wp-content\uploads\20097. Is its parent directory writable by the server?”

  8. I had this problem and spent several hours reading posts about with no luck. My permissions were right and the upload folder path was correct.

    I realised that it was a SELinux issue for me. If you run SELinux then you will need to run the command below to allow apache (httpd) to execute particular PHP commands, including creating new files and folders. Here is the command:

    chcon -R -t httpd_sys_content_t

    Hope that helps someone else. This was driving me crazy and I was about ready to give up and uninstall WordPress. Glad it didn’t come to that.

  9. Just a heads up that 777 permissions allow all kinds of security risks. Most webhosts will never recommend changing anything to these permissions as it allows you and the rest of the world full access to your folders. From there things like malicious scripts among other things can be uploaded.

  10. I had the same problem too, my hosting provider moved my site to a new server and I was unable to upload images any more. The 3rd solution worked for me. If you ever have the same problem, make sure the upload directory is exactly wp-content/uploads.

Leave a Reply

Your email address will not be published.