Resetting file permissions for WordPress

WordPress seems to be a minefield when it comes to file permissions. Sometimes we just want to start again and reset the files back to a nice safe setup. Here is my 3 liner to reset  directory permissions back to 755  and 644 for file permissions:

# cd /web_site_root
# find ./ -type d -exec chmod 755 {} \;
# find ./ -type f -exec chmod 644 {} \;

Now we can worry about gradually slackening up the permissions to allow those ‘features’ to work.

This entry was posted in Apache, FreeBSD Administration and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *