Created
June 29, 2021 11:57
-
-
Save smntb/9fd632b828062269db9e5855047af917 to your computer and use it in GitHub Desktop.
Apply correct Permissions to WordPress webroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
worked for me like a charm, Thanks!!!