Installing directly from Wordpress

  • Posted December 17, 2014


I have my wordpress website setup. I want to install a plugin directly from the site, however it is giving me issues saying it can’t create the directory, probably because of permissions issues? I am aware i could install it manually, but i’d like to get this setup where i can install it securely. I assume if i change it to 777 it will be insecure. Can someone tell me the solution.



Submit an 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.

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

should do the trick. You may want to add your user to the www-data group so you can edit stuff when you sftp in:

sudo usermod -aG www-data $USER

This comment has been deleted

@aguilar1181. I know why i dont want 777 permissions that was not my question. So the only solution is to change it to 777 when u want to install something then change it back?

You never want to have folder permissions to 777 that’s how you get hack.The recommend it wordpress permissions for folders is 755 while files should be 644.