Said It Here

How to clean up a hacked website and fix malware

Website hacks manifest as random redirects, injected footer scripts, and unexpected user logouts that force owners to spend entire weekends manually scanning files and troubleshooting PHP functions at 3 AM. This demanding clean-up process stems from neglecting basic security hardening before the breach occurs, leaving sites entirely vulnerable to compromises.

What people tried

Every workaround mentioned in the threads below. We haven’t tested any of them — and nobody here is claiming they worked.

  1. 1
    Searching through files manually at 3 AM to find injected malware
  2. 2
    Installing security plugins like Wordfence, MalCare, or Virusdie
  3. 3
    Hardening server configurations and disabling unused endpoints
  4. 4
    Using version control and offsite backups to roll back changes
  5. 5
    backing up the site
  6. 6
    changing file permissions
  7. 7
    changing salts
  8. 8
    using security plugins like Wordfence
  9. 9
    blocking bots via network level controls
  10. 10
    Scanning local computers and browsers for malicious extensions or malware
  11. 11
    Manually checking server files, themes, plugins, and database tables for hidden accounts or backdoors
  12. 12
    Rotating all passwords, SFTP credentials, and application passwords
  13. 13
    Starting fresh by building on a new server or restoring from a clean local backup
  14. 14
    Repoint the domain if registered separately
  15. 15
    Change every login the site touched
  16. 16
    Reply directly to the takedown notice instead of opening a support ticket

In their words

Unedited, most upvoted first, each linked to the thread it came from.

so yeah... i got hacked last year. it was a mess. random redirects, weird scripts showing up in my footer, users getting logged out for no reason.source ↗

spent an entire weekend cleaning it up manually, scanning files, comparing timestamps, googling random php functions at 3am.source ↗

shsajalchowdhury · r/Wordpress · 193 upvotes

My WordPress site was hacked, even though I use security plugins like All-in-One and Wordfence.source ↗

Honestly, I’m not sure what else to check—I’ve reviewed the files and set up 2FA for WordPress, and everything seems fine for now, but the IP address thing is still on my mind.source ↗

cre_page_seo · r/Wordpress · 29 upvotes

I got hacked recently. Full pain the arse. My own fault as I had done zero to secure the site as it wasn't for a live service.source ↗

Monkeyboogaloo · r/Wordpress · 4 upvotes

Any issues are NOT responded to AT ALL.source ↗

My website got hacked into and- because the hacker destroyed said website / is using it to slander my business- just got taken down.source ↗

My card information is on that website and I have fought tooth and nail with every one of their customer service outlets to absolutely no avail or resolution.source ↗

Murky_Quantity_5035 · r/smallbusiness · 1 upvotes

I clearly have a backdoor door somewhere open, I’ve done everything I can and more to fix this issue, I’ve done backups you name it.. can anyone help me out as my Wordpress core files keep changingsource ↗

Proud_Error5073 · r/Wordpress

So login to Wordpress, Wordfence deactivated, reactivate it.. then deactivated again, login to cloudflare 22,000 traffic for my domain, then login to cPanel.. Wordpress core files changed… get the picturesource ↗

Proud_Error5073 · r/Wordpress

Brother I’ve tried everything, changing file permissions, salts, wp,admin cloudflare, Wordfencesource ↗

Proud_Error5073 · r/Wordpress

Where this came up

People with this problem also raised