Created
November 6, 2014 21:46
-
-
Save KrustyHack/fb37b2f71437eb153252 to your computer and use it in GitHub Desktop.
Wordpress correct permissions
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
#!/bin/bash | |
if [ "$1" != "" ]; then | |
cd $1 && chown www-data:www-data -R *; | |
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; | |
else | |
echo "Usage: sudo ./wordpress-permissions.sh WORDPRESS_PATH \n" | |
echo "Example: sudo ./wordpress-permissions.sh /home/test/mywordpress \n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment