Problem with theme in wordpres 6

Posted in: Newsmag
Post count: 15

Hi

.htacces file it’s getting corrupted, what should I do, since I’m deleting it, it’s working for a few minutes or hours, then the same thing again

Post count: 35449

Hi,
It is possible to me a code that is injected in .htaccess and this provide this problem.
The code can be from a plugin or it can be a malware injection.
Also, please check this article https://wpbrainery.com/wordpress/how-to-fix-a-corrupted-htaccess-file/
I hope this will help you!

Post count: 15

Hi Calin,

Thank you for your replay, I followed this tutorial before, and yes I am deleting the .htaccess file but after some minutes it’s getting corrupted

Post count: 35449

Hello,
Normally the .htaccess file is generated by WordPress, but it can be injected with extra code using functions, plugins, malwares. So if you have those kind of problems it will be better to ask your host about the security that they provide for your website and how to prevent this kind of situations.
Also, maybe those articles can help you:
How to Scan WordPress for Malware in 4 Easy Steps
How to Scan Your WordPress Site for Potentially Malicious Code
Thank you!

Post count: 9544

Be sure to check if you have an AMP plugin running as this will add redirection code to things like content.page/amp and this will update the htaccess file — also any redirection plugins that might have an automatic setting running to automatically update URLS.

Make sure not using any ‘nulled’ plugins off the web and not from the WordPress.org repo.

Also good to download the file via ftp, and inspect it. Resave with linux line breaks unless windows pc, make sure saved as UTF-8 format. Set permissions to read only, then check error logs to see what is trying to write to it and failing with read only permissions. (Cannot be corrupted if set to read only, vs write permissions need to be on to alter it.)

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newsmag’ is closed to new topics and replies.