Wordpress file permissions

  • Posted on July 14, 2014
  • empAsked by emp

OK… I have 2 users for my droplet root (unused) user (user with all privileges, obviously not the real name)

However, I chowned wp-content/uploads to user and chmodded it to 775

Wordpress is unable to uplaod anything unless I change permissions to 777

Any pointers?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Wordpress most likely runs as the user “www-data”, so you will need to allow it to write to wp-content/uploads.

Since the directory already allows the members of the group that owns it to write to it (775), you just need to change its group ownership to the www-data group:

sudo chgrp www-data wp-content/uploads

Make sure you apply it recursively so that it can write to its subdirectories as well:

sudo chgrp -R www-data wp-content/uploads
sudo chmod -R g+w wp-content/uploads

Hello there,

These commands should set the correct permissions for your site.

  1. sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
  2. sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;

Usually, you’ll have 750 permissions for your directories and 640 for the files. However, in some cases, this won’t be sufficient.

You need to update the path for the WordPress directory to match the path of your WordPress installation.

These permissions should get you working effectively with WordPress, but note that some plugins and procedures may require additional tweaks.


sudo chown -R www-data:www-data /var/www

worked perfectly fine for us on our website