WordFence breaks .htaccess file
-
Hey guys,
WordFence has broken my .htaccess file again. It is completely empty.
Can you please add in some code that makes a backup copy of .htaccess before writing changes? Check the file size of .htaccess and if it is greater than 0 please try to make a backup of it ( .htaccess.pre_falcon or something )
This happens when the hosting account runs out of disk space. It clears the .htaccess file but is unable to write the new contents to it.
So please check that making a backup of the .htaccess file worked first (that will let you know if there is free disk space) and then if the backup worked proceed to write the new .htaccess file content.
Do not backup a 0 byte .htaccess file
The topic ‘WordFence breaks .htaccess file’ is closed to new replies.