WordPress itself is secure and actively maintained. Most compromised WordPress sites are hacked because of outdated plugins or themes, weak passwords, or poor hosting. The good news: a handful of habits prevent the large majority of attacks. Here’s what every site owner should do.
1. Keep everything updated
Updates fix security vulnerabilities. Keep WordPress core, themes and plugins up to date, and remove any plugin or theme you don’t use — inactive code can still be exploited. For business-critical sites, test updates on a staging copy first.
2. Use strong logins and two-factor authentication
- Use a unique, long password for every admin account (a password manager helps).
- Enable two-factor authentication (2FA) for administrators.
- Don’t use “admin” as a username.
- Limit login attempts to slow down password-guessing bots.
3. Give people only the access they need
WordPress roles exist for a reason. Content writers should be Authors or Editors, not Administrators. Remove accounts for people who no longer work with you, and review users regularly.
4. Take backups — and test them
Backups are your safety net against hacks, mistakes and server failures. Keep automated backups of files and the database, store them off-site, retain several versions, and occasionally test that a restore actually works.
5. Choose quality hosting
Good hosts keep server software updated, isolate accounts, provide malware scanning and offer free SSL. Cheap hosting that cuts corners on security can undermine everything else you do.
6. Use HTTPS everywhere
An SSL certificate encrypts data between visitors and your site, protecting logins and form submissions. Most hosts provide free certificates. Make sure all pages redirect to HTTPS.
7. Add a web application firewall
A firewall filters malicious traffic before it reaches WordPress. Services such as Cloudflare operate at the network edge, while security plugins provide firewall rules at the application level.
8. Install plugins carefully
- Download plugins only from WordPress.org or reputable developers.
- Never install “nulled” (pirated) premium plugins — they often contain malware.
- Check that a plugin is actively maintained and compatible with your WordPress version.
- Fewer plugins means fewer potential vulnerabilities.
9. Harden the basics
- Disable file editing from the dashboard by adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.php. - Set correct file permissions.
- Keep
wp-config.phpsecure and use unique security keys.
10. Monitor your site
Set up uptime monitoring, check Google Search Console for security warnings, and consider file-change monitoring. The sooner you notice a problem, the easier it is to fix.
What to do if you’re hacked
- Stay calm and don’t delete things at random — you may lose evidence of how the attacker got in.
- Change all passwords (WordPress, hosting, database, FTP) and review user accounts.
- Restore a clean backup from before the hack, or have a professional clean the site.
- Update everything and close the entry point.
- Request a review in Google Search Console if your site was flagged.
Summary
Security is a routine, not a one-time task. Updates, strong logins, backups, minimal plugins and good hosting will protect most sites. If you’d rather not manage it yourself, a maintenance plan covers all of this for you.
