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 *Code language: CSS (css)

Change directory permissions rwxr-xr-x

find . -type d -exec chmod 755 {} \;Code language: CSS (css)

Change file permissions rw-r--r--

find . -type f -exec chmod 644 {} \;Code language: CSS (css)

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

Leave a Reply

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