Created
May 2, 2021 03:53
-
-
Save asheroto/12ca0524505ec3fe4469aa504b61a084 to your computer and use it in GitHub Desktop.
WordPress chmod / security - standard recommendations. Run script at the root of the website (where wp-content, wp-config.php, etc is located).
This file contains hidden or 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 | |
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
chmod 755 wp-content; | |
find wp-content/ -type f -exec chmod 644 {} \; | |
find wp-includes/ -type f -exec chmod 644 {} \; | |
mkdir wp-content/uploads; find wp-content/uploads -type f -exec chmod 755 {} \; | |
chmod 444 wp-config.php; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment