Skip to content

Instantly share code, notes, and snippets.

@smntb
Created June 29, 2021 11:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smntb/9fd632b828062269db9e5855047af917 to your computer and use it in GitHub Desktop.
Save smntb/9fd632b828062269db9e5855047af917 to your computer and use it in GitHub Desktop.
Apply correct Permissions to WordPress webroot
# Go to the WordPress root directory
cd /path/to/wordpress
# Change ownership
find ./ -exec chown www-data:www-data {} \;
# Change folder and files permissions
find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;
# Correct permissions to wp-config.php
chgrp www-data ./wp-config.php
chmod 660 ./wp-config.php
# allow wordpress to manage wp-content
find ./wp-content/tmp -exec chgrp www-data {} \;
find ./wp-content/tmp -type d -exec chmod 775 {} \;
find ./wp-content/tmp -type f -exec chmod 664 {} \;
@furqanwasi
Copy link

worked for me like a charm, Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment