Skip to content

Instantly share code, notes, and snippets.

@mvidaldp
Last active July 1, 2020 12:40
Show Gist options
  • Save mvidaldp/7dd903f36badd02d0278bf20511dfe5a to your computer and use it in GitHub Desktop.
Save mvidaldp/7dd903f36badd02d0278bf20511dfe5a to your computer and use it in GitHub Desktop.
How to correctly set permission to run Wordpress on NGINX
# by default NGINX runs the master process as root and worker processes as user http
sudo chown http:http /var/www/yoursitefolder -R
# set only the necessary permissions (0755 for folders and 0644 for files)
sudo find /var/www/yoursitefolder -type d -exec chmod 0755 {} \; # folders
sudo find /var/www/yoursitefolder -type f -exec chmod 0644 {} \; # files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment