First off, don’t panic. That might seem like simple advice or even bad advice but after your website was hacked, the last thing you want to do is panic or try doing this too quickly.
Step One when dealing with a hack is to determine where that hack is.
When I’m called in to help get a hacked website back together, the first thing that I do is disable all the plugins and see if the vandalism goes away. If it does, the hack is in one of the plugins and I simple reactivate them one at a time until I find the culprit.
If it’s not in the plugins, I download a fresh theme from WordPress.org and install it on my website, this allows me to see if the hack is in my theme files. If it is, simply reinstalling my theme will solve the problem.
Using a tool like phpMyAdmin, I scan the database for keywords and common phrases which might point to a database insertion.
Finally, I test the WordPress files themselves. A lot of hackers attach their rubbish to the core WordPress files these days, to clean them up I simply replace them all with a fresh install.
What to do next?
If you suspect your website has been the victim of a hack, the most important thing to do is replace all your current usernames and passwords with clean ones. Make sure to include:
- FTP & Hosting Control Panel
- WordPress Admin
- Database Connectivity
Afterwards, ensure you’ve deleted all non essential user accounts in WordPress and be sure to follow my guide to securing WordPress.