LEMP + Wordpress = how to configure for Wordpress update?
How can I set this up without using ftp?
3 Replies
i.e.
chown -R www-data /path/to/wordpress
…do update…
chown -R fred /path/to/wordpress
To solve that you can try to give "ownership" to the nginx user (www-data in ubuntu/debian, http in arch linux…) or give group write permission, create a new group, change the group of the wordpress directory to the recent group and then make sure the nginx user is part of it.
Be advised that the web server have to be capable of write not only the "wordpress dir", also the "document root".
(In my example, the document root is folder websites)
cd /path/where/you/host/your/websites
cd ..
chmod -R g+rs websites
groupadd wordpress
chgrp -R wordpress websites
The "g+rs" is to make the folder "sticky", that means every file created will keep the current directory group, so, every new file will be in the wordpress group.
A bit longer solution, but I found more elegant =P