Created
September 3, 2022 09:12
-
-
Save maxyudin/2ed4559561744eb057aacf2b1fe6b318 to your computer and use it in GitHub Desktop.
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
# Cheatsheet: correct file permissions for WordPress | |
# During the setup: | |
cd /wordpress-directory # Change directory | |
chown www-data:www-data -R * # Let Apache be owner | |
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x | |
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- | |
# After the setup you should tighten the access rights: | |
chown <username>:<username> -R * # Let your useraccount be owner | |
chown www-data:www-data wp-content # Let apache be owner of wp-content | |
# Source (amended): https://stackoverflow.com/a/23755604/577418 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment