The moment you suspect a site has been tampered with is when it is easiest to act in a hurry. But the wrong order can erase the clues you need, or let the same visitor back in through the same door. This article lays out a first response for a suspected WordPress compromise in this order: isolate, preserve evidence, restore from a clean backup, rotate credentials . It does not cover attack techniques; it focuses on a calm way to proceed. The best steps depend on your environment, so please treat this as a starting point and involve your hosting provider or a specialist when unsure.
First, do not rush to delete
When you find a suspicious file, the urge is to delete it immediately. That is natural, but record what happened before you remove anything . Once files are gone, you may no longer be able to tell when or how someone got in, and the same gap may remain after recovery.
Also, finding and removing one item does not mean you are done. What you found may be only part of it.…