DEV Community


Reset WordPress File Permissions

Jack Harner πŸš€
I'm Jack! I'm a Freelance Developer. I have experience with WordPress, Shopify, BigCommerce, React, Linux Admin, & More! Ask Me Anything!!
Originally published at on ・1 min read

Originally Posted to

Somehow I continuously run into File Permissions Issues while working with WordPress, so this is primarily just a reference for myself. For whatever reason, things can get pretty hectic, and you've probably ran into a similar issue if you've ever seen a "Permission Denied" error, or if WordPress asks you for your FTP Connection Information to update a plugin.

WordPress asking for Connection Information

Sometimes it's just best to reset everything back to the way Apache needs it to be to run smoothly: 775 on folders, and 664 on files.

Run the following 3 terminal commands from the root of your WordPress install (the folder containing your wp-config.php file):

chown www-data:www-data -R * # Set Apache's www-data user as the owner
find . -type d -exec chmod 775 {} \; # Change folder permissions to rwxrwxr-x
find . -type f -exec chmod 664 {} \; # Change file permissions to rw-rw--r--
Enter fullscreen mode Exit fullscreen mode

I'm sure future me is thanking "now" me for writing this down so I can stop googling it. You're welcome future me!

Discussion (0)