WordPress Security Basics: 10 Steps to Protect Your Website from Hackers
A hacked website damages trust, rankings and revenue. The good news is that most attacks exploit basic weaknesses: outdated software, weak passwords and neglected plugins. These ten steps close the most common doors.

1. Keep everything updated
Updates to WordPress core, themes and plugins often include security fixes. Delay them and you leave known holes open. Test updates on a staging copy for important sites, then apply them promptly.
2. Use strong, unique passwords and a password manager
Every account, including hosting, email, WordPress and database, needs a long, unique password. Avoid the default admin username and remove accounts that are no longer used.
3. Turn on two-factor authentication
Two-factor login means a stolen password alone is not enough. Enable it for every administrator and editor.
4. Take regular, off-site backups
Backups are your safety net. Store them away from your web server, automate them daily or weekly depending on how often content changes and test a restore at least once. A backup you have never restored is a hope, not a plan.
5. Install only trusted plugins and themes
- Download from the official repository or reputable vendors.
- Avoid nulled or pirated premium plugins, which commonly carry malware.
- Delete anything you are not using, not just deactivate it.
6. Use HTTPS everywhere
An SSL certificate encrypts data between your visitor and your server. Force HTTPS sitewide and fix mixed-content warnings.
7. Limit login attempts and protect the login page
Brute-force bots hammer wp-login.php constantly. Limit failed attempts, add a CAPTCHA or challenge where needed and consider changing the login URL or restricting access by IP for admin-only sites.
8. Choose secure hosting
Good hosts provide server-level firewalls, malware scanning, isolated accounts and current PHP versions. Cheap hosting that never patches its servers puts your site at risk regardless of what you install.
9. Apply least privilege
Give people only the permissions they need. A blog writer should be an Author or Editor, not an Administrator. Review user roles regularly.
10. Monitor and respond
Use a reputable security plugin or service for malware scanning, file-change detection and activity logs. Know in advance what you will do if the site is compromised: restore from backup, change all passwords and find the entry point. Related reading: securing a WooCommerce store.
Key takeaways
- Update core, themes and plugins promptly and remove what you do not use.
- Use unique passwords, two-factor authentication and least-privilege roles.
- Keep tested off-site backups and force HTTPS.
- Monitor your site and have a recovery plan ready.
Frequently asked questions
Is WordPress secure?
WordPress core is actively maintained and secure when kept updated. Most compromises come from outdated plugins, weak credentials or poor hosting.
What should I do first if my site is hacked?
Take it offline or put it in maintenance mode, restore a clean backup, change every password, update all software and identify how the attacker got in.



