defender can't write to htaccess file

I have support access turned on for

I'm using defender and trying to turn on one of the hardening features and getting an error that it can't write to the htaccess file.

  • Adam Czajczyk

    Hello Corn,

    I hope you're well today and thank you for your question!

    Such a message means that the .htaccess file is write-protected (which is actually good for security and recommended). That can't be changed from WP back-end and in order to handle the issue you'll need to access the server directly using FTP and/or cPanel's "File Manager" tool.

    You will want to check file permission for .htaccess file and make temporarily change them to 0644 or even 0755, then run hardening option and then change permissions back to as they currently are.

    Alternatively, the "failing" hardening option should show "Want to do this manually?" option and clicking it will give you a code to be added to .htaccess file.

    If you have any further questions on this, let me know please.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.