admin管理员组

文章数量:1122846

every week my site's every folder has .htaccess when try to open the site it gets a virus error. I remove .htaccess manually from every folder and then the site works. but after a few days, I got the same problem. What should I do to resolve this issue?

every week my site's every folder has .htaccess when try to open the site it gets a virus error. I remove .htaccess manually from every folder and then the site works. but after a few days, I got the same problem. What should I do to resolve this issue?

Share Improve this question asked Aug 20, 2022 at 9:18 Noor AfridiNoor Afridi 11 silver badge1 bronze badge 1
  • Did you ever resolve this? I am having the same issue on many of my sites. – Chris Cook Commented Apr 21, 2023 at 14:59
Add a comment  | 

1 Answer 1

Reset to default 0

Here are a few steps, even though you have to move in the process towards whatever is necessary.

  • Step 1: Backup wp-contents folder and the files

  • Step 2: Backup credentials at wp-config files

  • Step 3: Find and delete unwanted plugins and theme files, if anything is suspicious.

  • Step 4: Delete the default WordPress files other than wp-content folder.

  • Step 5: Reupload those files manually and replace wp-config.php with the previous one, otherwise database connection error will happen.

These are the most common steps to get rid of a virus, depending on the type of script they are using, or the location of of infected file, your steps will differ.

If the attacker has planted a file in the server storage, and you are using a shared hosting, you might need to change your hosting to get rid of it.

Hope this helps.

本文标签: dashboardhtaccess found in every folder