Folder permissions are essential to be able to add .htaccess

Hi dear All,

I am trying to harden the website using Defender.

When is to be added a .htaccess file to protect some folder (/oldpipl/wp-content/uploads/) it can't be done because of some folder permissions.

Please repeat how a solid Wordpress website should have the folder permissions... Also the groups and ownership.



  • Sajid

    Hi @vanzari,
    Hope you are doing good today :slight_smile:

    Filer permissions for .htaccess file should be 644. This will allow the WordPress to modify the .htaccess file. If you don't want to allow automatic modification of .hataccess file then set its permissions to 604. In this case you have to modify the file manually.

    File and folder permissions for WordPress website according to WordPress codex are 755 for directories/folders and 644 for files (ideal). But yes in some cases you might need etc permissions or restrict access for files and folder according to your hosting setup or according a specific plugin.

    Checkout our blog article to understand what are file/folder permissions and groups and how you can use them to secure your WordPress website.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:
    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.