WordPress is the most targeted website platform on the internet, and the reason is simply scale: there is so much of it to attack. The good news is that nearly all WordPress compromises come from a short list of avoidable causes. If you close those doors, you remove most of the risk. This guide covers what to do, how often, and how to respond if something goes wrong.
How WordPress sites actually get hacked
- Outdated core, themes or plugins with known, already-patched vulnerabilities. This is the leading cause.
- Weak or reused admin passwords, cracked by automated brute-force attacks.
- Nulled or pirated plugins and themes, which frequently ship with hidden malicious code.
- Abandoned plugins that no longer receive security fixes.
- Poorly secured hosting, where another account on the same server is compromised and spreads.
- Stolen credentials, from phishing or leaks on other sites.
1. Keep everything updated
This is the single most effective step. Attackers scan the internet for sites running specific vulnerable versions within hours of a fix being published.
| Update type | Suggested timing |
|---|---|
| Security releases (core or plugin) | As soon as possible, ideally within a few days |
| Minor updates | Weekly to monthly |
| Major version updates | After testing on a staging copy if the site is complex |
Always take a backup before updating. Updates rarely break things, but "rarely" is not "never". If you do not have the time or confidence to do this consistently, put the site on a maintenance arrangement; see why regular maintenance saves money.
2. Use strong, unique passwords
Use a long, unique password for every account tied to the site: WordPress admin, hosting control panel, FTP, email and database. A password manager makes this practical. Do not use admin as a username. Read common website security mistakes for what to avoid.
3. Turn on two-factor authentication
Even a strong password can be phished or leaked. A second factor, such as an authenticator app, stops most automated takeover attempts. Enable it for every administrator and editor account, and on your hosting account.
4. Limit login attempts and protect the login page
Brute-force bots try thousands of combinations. Use a plugin or a server firewall to lock out an IP after a few failed attempts, and consider changing or restricting access to the default login URL.
5. Install only trusted software
- Use official sources: the WordPress plugin directory or reputable commercial vendors.
- Avoid nulled or cracked premium themes and plugins, whatever the discount.
- Check that a plugin is actively maintained, has recent updates and a decent number of installs.
- Delete unused plugins and themes. Deactivated code can still be exploited.
6. Use a security plugin and server-level protection
A reputable security plugin adds malware scanning, a web application firewall and login protection. Pair it with host-level protection: firewalls, isolation between accounts and network-level DDoS protection. Hardening that happens before the request reaches WordPress is more effective than anything that happens afterwards.
7. Make sure backups are automatic and restorable
Backups do not stop an attack; they make it survivable. Keep automatic daily backups, store at least one copy off the server, and test a restore. See how often to back up your website.
8. Harden the basics
- Serve the site over HTTPS; see what an SSL certificate does.
- Set correct file permissions and disable file editing in the dashboard.
- Remove unused admin users and give each person the lowest role they need.
- Keep a current PHP version, as old versions stop receiving security fixes.
Signs that your site may be infected
- Visitors are redirected to unrelated or suspicious sites.
- Unknown admin users, posts or pages appear.
- Google shows "This site may be hacked" or warnings in search results.
- Your host suspends the account for sending spam or using excessive resources.
- The site is suddenly slow or shows pop-ups.
See how to know if your website has been hacked for a complete checklist.
If you are already infected
- Contain it. Put the site in maintenance mode or take it offline to protect visitors.
- Preserve evidence. Take a copy of the infected site and logs before cleaning, if you want a forensic review.
- Restore from a clean backup taken before the infection, if available.
- If no clean backup exists, a security specialist or your host's security team must manually clean the files and database.
- Close the entry point. Update everything, remove the vulnerable plugin or theme, and delete unknown users.
- Change every password and reset the secret keys in
wp-config.php. - Ask Google to re-review the site if it was flagged, through Search Console.
Frequently asked questions
Is WordPress less secure than other platforms?
No. It is attacked more because it is more common. A well-maintained WordPress site is hard to compromise.
Do I need a security plugin if my host is secure?
It still helps. Host-level and application-level protection complement each other.
How much does a hack cost?
Cleanup, lost sales, lost trust and search ranking damage usually cost far more than prevention. Prevention is mostly time and habit.
Can you manage this for me?
Yes. Talk to us about a maintenance arrangement, or choose managed WordPress hosting with security tooling and daily backups.
Your 15-minute checklist
- Update WordPress, themes and plugins after taking a backup.
- Delete unused plugins, themes and users.
- Enable two-factor authentication on admin accounts.
- Confirm automatic daily backups and download one copy.
- Check that the site loads over HTTPS without warnings.