• Resolved awr10e

    (@awr10e)


    Hi, I have just installed your plugin and am trying to optimize the Wordfence Web Application Firewall, but get the unable to write to .htaccess error.

    I’ve checked the permissions which are set to 644, other plugins (W3 Total Cache) are able to write to the file.

    How can i check if my web server can write to the file, (which as far as i am aware it can) and how can i get your plugin working?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @awr10e,

    In order to make sure which Firewall setup you should be using:

    • Go to the Wordfence Tools page
    • Click the Diagnostics tab
    • In the Other Tests section (near the bottom of the page), click the link that reads “Click to view your system’s configuration in a new window“. This will open a Wordfence System Info page

    Check the Server API field. Is it consistent with the parameter which is “Recommended based on our tests“?

    Thread Starter awr10e

    (@awr10e)

    Hi wfyann

    I’ve done as you say and the Server API is said to be CGI/FastCGI on the info page.

    In the configure section the recommended setting is Apache + suPHP. Tried changing to Apache + CGI/FastCGI, but still get the cannot write to .htaccess error.

    Thanks

    Hi @awr10e,

    On sites with CGI/FastCGI or suPHP, the firewall setup uses the .user.ini file.

    Can you see the Wordfence code surrounded with comments “Wordfence WAF” and “END Wordfence WAF” in the .user.ini file located in the site’s main directory?

    In case you do, could you check that the path to the wordfence-waf.php file (specified in the auto_prepend_file directive) is correct.

    Also, can you please confirm which version of PHP you’re running?

    • This reply was modified 7 years, 2 months ago by wfyann. Reason: Added link to documentation
    Thread Starter awr10e

    (@awr10e)

    Hi wfyann

    I didn’t have a .user.ini file, so i created one, and edited one from anther site to say the correct dir. The request to optimise has vanished.

    I’m using PHP version 7.1

    Thanks for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘unable to make changes to the .htaccess file’ is closed to new replies.