Skip to content

Instantly share code, notes, and snippets.

@marcosricardoss
Last active February 17, 2021 12:49
Show Gist options
  • Save marcosricardoss/ee080567a69d0cb6684da0758c9d9771 to your computer and use it in GitHub Desktop.
Save marcosricardoss/ee080567a69d0cb6684da0758c9d9771 to your computer and use it in GitHub Desktop.
How to Fix File and Folder Permissions Error in WordPress
#!/usr/bin/env bash
chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment