I’ve a WordPress site which 2 or 3 times a week rewrites the index.php and .htaccess files. After it happens the site goes blank, can’t open /wp-admin or anything else for that matter. Each time I have to replace the index.php and .htaccess files with the originals to pull the site back.
This is a fragment of the index.php after WordPress modifies it:
and this is the modified .htaccess:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(index|wp-admin|wp-include|wp-comment|wp-loader|wp-corn-sample|wp-logln|output|about|admin|wp-ver).php$ - [L] RewriteRule . index.php [L] </IfModule>
I tried removing write privilege from these files, yet they keep being overwritten.
I tried disabling plugins, but it still happens.
Can a removed plugin still affect the site?
I’m using a theme called Avada.
What could be causing this problem?
Any help would be greatly appreciated.