Title: delete malicious files automatically
Last modified: August 22, 2016

---

# delete malicious files automatically

 *  Resolved [ernietazo](https://wordpress.org/support/users/ernietazo/)
 * (@ernietazo)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/)
 * Hi, how can I set Wordfence to automatically
    1 – Delete non-wordpress files 
   2 – restore changed wordpress files
 * Thanks
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

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

 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/#post-5651868)
 * Hi
 * I think the reason we don’t do that is because sometimes (not always but sometimes)
   there are files inside your wordpress directory that might not be wordpress files.
   We see this for Dart, Bing, Google, various things like that, as well as user
   added files. We can scan them and alert you but if we deleted without confirmation
   theres a potential to cause you more grief. We prefer to err on the side of caution
   and make sure that what you delete is something you want to delete.
 * I don’t believe we have an option that automatically restore the change wordpress
   core files but I am making the suggestion today to our dev team. I can’t promise
   when or if it makes it into a release, but we take every suggestion seriously.
 * Thanks for helping make wordfence great!
 * tim
 *  [The Hack Repair Guy](https://wordpress.org/support/users/tvcnet/)
 * (@tvcnet)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/#post-5651876)
 * With respect ernietazo, this is not really doable, for all kinds of reasons.
 * I don’t think the good folk at Wordfence want to take on that level of potential
   disaster.
    Ouch potential = extreme!
 *  [Hudson Atwell](https://wordpress.org/support/users/hudson-atwell/)
 * (@hudson-atwell)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/#post-5652022)
 * I’ve a client site where it’s 100% WordPress but somehow new files are getting
   uploaded regularly outside of the WordPress environment.
 * I would love (have the client pay) to have WordFence automatically detect and
   delete these files while I continue looking for the point of breach.
 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/#post-5652023)
 * I would think it might be a database hack generating the pages. I’d start looking
   there.
 * My answer about this one stands from when I first answered seven months back.
   We wouldn’t want to do this because of the potential of damaging a site. If you
   are interested in a cleaning option, you can always email us at genbiz [at] wordfence.
   com. I’ll be happy to discuss options there.
 * tim

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

The topic ‘delete malicious files automatically’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [delete](https://wordpress.org/support/topic-tag/delete/)
 * [hacked](https://wordpress.org/support/topic-tag/hacked/)
 * [remove](https://wordpress.org/support/topic-tag/remove/)

 * 4 replies
 * 4 participants
 * Last reply from: [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/delete-malicious-files-automatically/#post-5652023)
 * Status: resolved