• biwook

    (@biwook)


    The .htaccess file randomly gets truncated to zero byte on my website, which breaks the nice urls. It happened 3 times in a few weeks, on several websites hosted on my server – all of them had WordFence installed. Sometimes, several websites had their .htaccess file truncated within a few minutes.

    After some investigation, it’s likely caused by WordFence rewriting the htaccess file every 5 minutes. I’m not sure what causes the rewrite to fail, I suspect a conflict with mod_security. The server is a fairly standard cPanel install.

    An easy work-around is to disable WordFence on all my websites, but I don’t want to loose the functionalities. I did a fair amount of googling and haven’t seen any similar issue.

    Has this issue been reported before? Any idea what is the cause, and how I can work around it?

    https://wordpress.org/plugins/wordfence/

Viewing 7 replies - 1 through 7 (of 7 total)
  • WFBrian

    (@wfbrian)

    Hi,

    I haven’t heard of a similar issue either. Are you using Falcon Cache in Wordfence?

    Thanks,
    Brian

    Thread Starter biwook

    (@biwook)

    I am using it indeed. Can it have a role?

    WFBrian

    (@wfbrian)

    Falcon writes to .htaccess. If you disable Falcon temporarily, does the issue go away? Are you using any other cacheing plugins?

    Thread Starter biwook

    (@biwook)

    I disabled falcon – the .htaccess is indeed not touched each 5 minutes anymore.

    Hard to tell at the moment if resolves the issue, as it only happens about 2 – 3 times per month. Let’s hope it won’t happen again.

    Thanks for the help!

    I am having the same issue for the past 6 months. The htaccess file is cleared and I lose significant site functionality. I am using Falcon cache. Is it the recommendation of the Author that Falcon cache disabled?

    Thread Starter biwook

    (@biwook)

    I haven’t had the issue again in the two weeks since I disabled falcon cache, it might be the solution.

    I had this issue when hosting account runs out of space: https://wordpress.org/support/topic/wordfence-breaks-htaccess-file/

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘.htaccess randomly truncated to 0 bytes’ is closed to new replies.