WordPress Permissions

WordPress permissions and your ability to alter them will vary widely depending on your hosting arrangements and server software. Here are my server settings based on a self managed Digital Ocean droplet running Ubuntu 16.04 and NGINX.

While your setup might well be different, there are many commonalities that will be appropriate for any hosting environment.

The recommended settings for WordPress directories and files are as follows:

Directories should be set to 750

Files should be set to 640
except wp-config.php which should beĀ 440 or 400.

Set directory permissions

find /srv/www/your-site/ -type d -exec chmod 750 {} \;

Set file permissions

find /srv/www/your-site/ -type f -exec chmod 640 {} \;

Set wp-config.php permission

sudo chmod 440 your-site/wp-config.php

Define the fs method in wp-config.php

define('FS_METHOD', 'direct' );

Leave a Reply

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