Set WordPress file and folder permissions via terminal

If you read the recommended guide for Changing File Permissions on WordPress.org it will leave you wondering what's the terminal command to actually apply the changes.

Go to the folder where your WordPress install is and run these commands:

Let Apache be owner

chown www-data:www-data  -R *

Change directory permissions rwxr-xr-x

find . -type d -exec chmod 755 {} \;

Change file permissions rw-r--r--

find . -type f -exec chmod 644 {} \;

Props: https://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*