Report this

What is the reason for this report?

How do I set permissions for uploading media in WordPress? (Ubuntu 14.04.1, nginx 1.4.6)

Posted on November 17, 2014

I’m having trouble finding the correct permissions for running a WordPress site on my droplet. I followed this guide to configure the site: How To Configure Secure Updates and Installations in WordPress on Ubuntu

Configuration is as follows:

  • Ubuntu 14.04, nginx 1.4.6
  • nginx user is www-data
  • /var/www/* is owned by wp-user:wp-user
  • Directories are set to 755 and files to 644 (WordPress docs)

Secure updates and theme/plugin installations work as expected, but I receive the following error when attempting to upload new media through the web interface: Unable to create directory wp-content/uploads/2014/11. Is its parent directory writable by the server?

Any thoughts on how I can configure owners/permissions to allow this (while maintaining security)?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Updating the user/group for the php5-fpm process solved this.

In /etc/php5/fpm/pool.d/www.conf, I updated the user/group lines as follows:

user = wp-user
group = wp-user

Then I restarted the service: sudo service php5-fpm restart

Thanks to masegaloeh over at Server Fault for the helpful comment!

This had been driving me nuts for months! I got all kinds of crazy responses to my cries for help, but none of them did the trick until this.

hello, my wordpres folder dosen’t apper and i give the right acces, if i move a website in the folder html it works … why ?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.