Most hacked WordPress sites I am asked to look at were not targeted by anyone. A bot found an old plugin, a weak password or a forgotten admin account, and got in. That means most break-ins can be prevented with routine work, not expensive tools.
This is the checklist I go through on client sites. It is ordered by how much risk each step removes.
1. Keep WordPress, themes and plugins updated
Outdated plugins are the most common way in. Turn on automatic updates for minor WordPress releases, and update plugins and themes at least once a week. On a business site or store, test updates on a staging copy first so a broken update does not reach customers.
2. Remove what you do not use
A deactivated plugin can still be attacked, because its files are still on the server. Delete plugins and themes you are not using, and keep one default theme as a fallback. Fewer plugins also means fewer updates to manage.
3. Fix the logins
- Use a long, unique password for every admin account, stored in a password manager.
- Turn on two-factor authentication for administrators.
- Delete admin accounts that belong to former staff or old agencies.
- Give people the lowest role that lets them do their job. A writer does not need to be an administrator.
- Limit login attempts so bots cannot guess passwords all day.
4. Set up backups you have tested
Schedule automatic backups and store them away from the web server, for example in cloud storage. Then restore one on a staging site. A backup you have never restored is only a guess.
5. Check the hosting basics
- Run a supported PHP version. Old versions stop getting security fixes.
- Use HTTPS on every page, with the certificate set to renew on its own.
- Use SFTP or SSH in place of plain FTP.
- Turn off file editing in the dashboard by adding
define('DISALLOW_FILE_EDIT', true);towp-config.php.
6. Add a firewall and scanning
A web application firewall blocks a lot of bad traffic before it reaches WordPress. Cloudflare, Wordfence and Sucuri are common choices. Pick one and configure it properly. Running several security plugins together usually causes conflicts and slows the site.
Signs that a site is already compromised
- Admin users you did not create.
- Visitors being redirected to other websites, often only on mobile.
- New files with random names in
wp-contentor the site root. - A warning from Google Search Console or your host.
- Spam pages from your domain showing in Google results.
When to bring in help
If you see any of those signs, do not just delete the strange file and move on. Infections usually leave a second way back in. Change all passwords, restore a clean backup if you have one and get the site reviewed.
I handle the prevention side: updates, cleanup of unused plugins, backups, user roles and hosting checks, as part of WordPress maintenance plans. For a serious infection on a store or a site that holds customer data, I will tell you if a dedicated security service is the better choice.
If you would like a second pair of eyes on your setup, send me the site address and what worries you.