• Hi,

    I moved my sites to a different host due to which the Firewall reverted back to basic protection. I tried the automatic configuration, which added the auto_prepend_file part to .htaccess but the firewall remains at basic protection.

    The alternate method says to add the line to the php.ini file. I created that file with that line in the root of the website, but the firewall remains basic.

    Then I read the documentation and that one talks about a file .user.ini. It doesn’t say what should be in that file, but I tried the same thing. So now I have in the root .htaccess + php.ini + .user.ini all with that ‘auto_prepend_file’ line and it still doesn’t work.

    In which of these files should this line be added? All of them? Or juct one? Or?

    Thanks!
    JP

Viewing 1 replies (of 1 total)
  • Ok, problem solved. WordFence has added the correct code, but on my hosting account the <IfModule mod_php7.c> statement doesn’t work. After putting these lines as a comment, the extended protection is enabled.

    #<IfModule mod_php7.c>
    php_value auto_prepend_file ‘/home/domains/…/public_html/wordfence-waf.php’
    #</IfModule>

    Need to say though that the documentation and onscreen instructions are very confusing. At part it talks about .htaccess, then about php.ini and also about .user.ini. With some testing with the various server configuration options that can be selected in WordFence I found that the files that is used depend on that configuration. That is not exactly clear in the documentation though.

Viewing 1 replies (of 1 total)
  • The topic ‘Confused where auto_prepend_file should be’ is closed to new replies.