Created
February 16, 2016 12:56
-
-
Save max2320/c735a356421b3c68f0bf to your computer and use it in GitHub Desktop.
This bash function improve security for your wp on aws
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
// usage wp-permission-fix <wp dir> | |
wp-permissions-fix(){ | |
sudo chown -R ubuntu:www-data $1 | |
sudo find $1 -type d -exec chmod 755 {} \; | |
sudo find $1 -type f -exec chmod 644 {} \; | |
sudo find $1/wp-content/uploads/ -type d -exec chmod 775 {} \; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment