
WordPress is so widespread that it is an attractive target for attackers. The good news: most attacks come from simple causes like missing updates and weak passwords.
12 essential measures
- Keep everything updated. WordPress core, themes and plugins. Don't delay security updates.
- Delete plugins and themes you don't use. Deactivating is not enough; delete them.
- Choose plugins carefully. Prefer ones with many active installs, regular updates and good reviews. Never use "nulled" plugins of unknown origin; many contain backdoors.
- Use strong, unique passwords, generated by a password manager (see our password manager guide).
- Don't use the "admin" username. Attackers try it first.
- Add two-factor authentication (see our two-factor guide).
- Limit login attempts. Some security plugins block after many failed tries.
- Use HTTPS (see our SSL guide).
- Back up regularly and test restoring (see our 3-2-1 backup guide). Keep backups outside the hosting too.
- Restrict user roles. Authors and editors shouldn't be administrators.
- Turn off the file editor. Add
define('DISALLOW_FILE_EDIT', true);towp-config.phpto disable code editing from the dashboard. - Pick reliable hosting. Good hosting offers a firewall and automatic updates.
Do you need a security plugin?
There is no single "magic" plugin. Security plugins provide a firewall, malware scanning and login protection; they don't replace the basic measures above. Don't install two security plugins that do the same job.
Signs your site was hacked
- Admin users you don't recognise.
- Spam links or redirects added to the home page.
- Strange foreign-language titles in Google.
- Malware warning from your host.
- A "This site may be harmful" warning in the browser.
What to do if hacked
- Tell your hosting company.
- Change all passwords (WordPress, hosting, database, FTP).
- Restore a clean backup; if there is none, clean the malicious files.
- Reinstall core and all plugins.
- Review admin users.
- Check the security issues section in Google Search Console and request a review.
- Find out how they got in, or it will happen again.
Maintenance calendar
- Weekly: check updates.
- Monthly: review users and plugins; test a backup.
- Quarterly: review passwords and access.
Step-by-step example: setting up a new WordPress site securely (day one)
- Choose reliable hosting and use current PHP/WordPress versions (see our domain and hosting basics guide).
- Don't use the default "admin" user; set a unique administrator name and a long password (see our password manager guide).
- Add two-step verification to the admin account (see our two-factor authentication guide).
- Set up SSL/HTTPS and enter the admin area only over HTTPS (see our SSL and HTTPS guide).
- Delete unused themes and plugins; install only from trusted sources and actively developed ones.
- Turn on automatic updates as far as possible; important for small security releases.
- Set up backups (files + database) and try a restore (see our disaster recovery plan guide).
- Limit login attempts and restrict access to the admin area.
- Disable the file editor and set file permissions correctly.
- Set up monitoring (uptime and change alerts; see our website monitoring guide).
Checklist when choosing a plugin
| Criterion | What to look at |
|---|---|
| Last update | Not older than a few months |
| Active installations | Wide use is a good sign |
| Reviews and support | Are problems answered? |
| Compatibility | Tested with the current WordPress version? |
| Known vulnerabilities | Does it appear in security advisories? |
| Necessity | Can't this be done without a plugin? |
"Nulled" (pirated) themes and plugins can contain malicious code; never use them.
Frequently asked questions
Is a security plugin enough alone? No; current software, a strong password, backups and correct configuration are the foundation. A plugin is an extra layer.
How do I know I've been hacked? Unexpected redirects, admin accounts you don't know, spam pages and odd titles in search results are signs.
What should I do first if I've been hacked? Put the site in maintenance mode, change passwords, go back to a clean backup and close the hole (see our incident response plan guide).
How do I protect the admin panel? Use IP restriction, a login attempt limit and 2FA.
Is all this needed for a small blog? Yes; bots scan sites automatically; small sites are targets too.
Serkan Akyürek is the founder and author of toolrota; he writes step-by-step guides on Excel, AI, the cloud, personal finance and digital security.