How to protect a website from hackers
By Ash, Founder, HosteazePublished 2 min read
The short answer
Most small business sites are hacked through out-of-date plugins, reused passwords or abandoned admin accounts, not clever targeted attacks. Keep your software updated, protect every login with a passkey or two-step verification, remove what you don't use, keep off-site backups and use HTTPS. A firewall then adds a useful extra layer.

Picture the typical website hack. It isn't a hooded genius picking your site out of millions. It's a bot trying the same old plugin flaw on every site it can find, or logging in with a password leaked from somewhere else. That's good news, because those attacks are stopped by dull, reliable habits rather than expensive tools.
How do most small business websites get hacked?
- Out-of-date plugins and themes with publicly known security holes.
- Weak or reused passwords on the website, hosting or domain accounts.
- Old admin accounts belonging to a former developer or employee.
- Abandoned plugins nobody has updated in years.
- Stolen logins from a phishing email.
The NCSC says one in two small businesses suffers a cyber incident every year. Most of those causes are fixable this afternoon.
What should I do first?
Work through these in order. The first three stop the majority of attacks.
- Turn on automatic updates for WordPress, plugins and themes. In WordPress, go to Plugins and click Enable auto-updates next to each one you trust.
- Protect logins. The NCSC now recommends passkeys where a service supports them, and otherwise a strong, unique password plus two-step verification. Do this for your hosting, domain registrar, email and website admin.
- Remove what you don't use: deactivated plugins, old themes and admin accounts for people who've left.
- Make sure the whole site runs on HTTPS. See how to install an SSL certificate.
- Keep backups somewhere other than your hosting account, and test that one restores. Our guide on how often to back up your website sets out a schedule.
- Stop admins editing code from the dashboard. WordPress's hardening guide suggests adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.php.
What do security tools add?
| Layer | What it protects against | Who usually provides it |
|---|---|---|
| Web application firewall | Malicious requests such as SQL injection | Your host, a CDN or a plugin |
| Login protection | Password-guessing bots | A security plugin or your host |
| Malware scanning | Infected files going unnoticed | Your host or a security plugin |
| DDoS protection | Floods of traffic | Your host's network or a CDN |
| Off-site backups | Everything else going wrong | You, a backup plugin or your host |
A web application firewall is the most useful of these for a typical WordPress site, because it blocks attacks on flaws you haven't patched yet.
How do I keep it secure over time?
Put a ten-minute check in your diary each month. Log in, confirm updates have run, look at the user list for anyone unfamiliar, and check the last backup date. Hacked sites are far more often forgotten sites than cleverly targeted ones.
If the worst happens, follow what to do when a WordPress site is hacked. Act quickly if personal data might be involved: the ICO says a reportable personal data breach must be reported without undue delay and within 72 hours of discovering it.
Frequently asked questions
Is my small website really a target?
Yes, though rarely personally. Most attacks are automated bots scanning thousands of sites for known weaknesses. The NCSC says one in two small businesses suffers a cyber incident each year, so being small isn't protection.
Do I need a security plugin for WordPress?
It helps, especially for login protection and malware scanning, but it can't fix outdated plugins or weak passwords. Treat it as a layer on top of the basics, and choose one that's actively maintained.
What should I do if my site has already been hacked?
Don't just delete the obvious bad files. Change every password, restore a clean backup from before the hack if you have one, update everything, and tell your host. If customer data may have been exposed, check whether you need to report it to the ICO, which has to happen within 72 hours.




