WordPress itself is well maintained and secure. Most hacked WordPress sites are compromised through outdated plugins, weak passwords or untrusted add-ons. That's good news: those are things you can control.
This checklist covers the steps that matter most, in rough order of impact.
1. Keep everything updated
This is the single most important item.
- WordPress core: leave automatic minor (security) updates on.
- Plugins and themes: update at least weekly. Turn on auto-updates for simple, trusted plugins.
- PHP version: run a supported version.
Read how to safely update WordPress, themes and plugins for a routine that won't break your site.
2. Use strong, unique passwords
Every admin account should have a long, unique password, generated and stored in a password manager. That includes:
- WordPress admin accounts
- Your hosting control panel
- Your client area
- FTP and database users
- Your email accounts
Read how to create strong passwords and turn on two-factor authentication.
3. Turn on two-factor authentication
Two-factor authentication (2FA) means a stolen password alone isn't enough to log in. Use a reputable security or 2FA plugin, and require 2FA for every administrator and editor.
4. Limit login attempts
Bots constantly try common usernames and passwords on WordPress login pages. A security plugin can:
- Limit failed login attempts and lock out offenders
- Add a CAPTCHA to the login form
- Block known bad IP addresses
Don't use admin as a username. Choose something unique.
5. Give users the lowest role they need
- Administrator: only people who manage the site
- Editor: people who manage all content
- Author: people who publish their own posts
- Contributor: people who write but can't publish
Remove accounts for people who no longer need access, such as former staff and freelancers who've finished their work.
6. Only install trusted plugins and themes
- Install from the official WordPress directory or reputable developers.
- Check that a plugin is actively maintained before installing it.
- Never use nulled (pirated) themes or plugins. They frequently contain backdoors.
- Delete plugins and themes you don't use. Inactive code can still be exploited.
See how many WordPress plugins is too many?
7. Use HTTPS everywhere
Your login details should never travel unencrypted. Make sure your site uses HTTPS and redirects HTTP visitors. See what is an SSL certificate?
8. Disable file editing in the dashboard
WordPress lets administrators edit theme and plugin code from the dashboard. If an attacker gets into an admin account, that's an easy way to plant malicious code. Turn it off by adding this line to wp-config.php:
define( 'DISALLOW_FILE_EDIT', true );
9. Check file permissions
Typical safe permissions:
- Folders:
755 - Files:
644 - wp-config.php:
640or600, where your server supports it
Never set anything to 777. You can check and change permissions in File Manager.
10. Protect wp-config.php and sensitive files
wp-config.php contains your database password. Make sure:
- It isn't publicly readable (permissions above)
- You don't leave copies like
wp-config.php.bakorwp-config.oldlying around, because they may be downloadable - Old backup archives aren't stored in your public web folder
11. Keep backups, and test them
Backups are your last line of defense. If the worst happens, you can restore a clean copy.
- Find out how often your host backs up your account, and how restores work.
- Keep your own off-site copies too. Read the 3-2-1 backup rule for websites.
- Occasionally test a restore on a staging site.
12. Use server-level protection
Your host's security matters too. Look for server-level tools such as:
- Imunify360, for proactive malware defense, automated security patching and a firewall
- CloudLinux, which isolates each account so a problem on one account doesn't spread to others
A WordPress security plugin adds protection inside your site, on top of that.
13. Disable XML-RPC if you don't need it
XML-RPC is an older interface used by some apps and services. It's also targeted for brute-force attacks. If you don't use the WordPress mobile app, Jetpack or a service that relies on it, many security plugins can turn it off.
14. Monitor your site
- Uptime monitoring tells you when your site goes down. See what is uptime?
- Security scanning plugins alert you to modified files and known vulnerabilities.
- Google Search Console warns you if Google detects malware or hacked content on your site.
15. Secure your accounts outside WordPress
Your site is only as secure as the accounts that control it:
- Your email (used for password resets)
- Your domain registrar
- Your hosting client area
Use strong passwords and 2FA everywhere you can.
If you've been hacked
Don't panic.
Frequently asked questions
Do I need a security plugin if my host has server-level protection?
Server-level tools like Imunify360 protect the server and catch a lot of malware. A WordPress security plugin adds protection inside your site, such as login limits, two-factor authentication and file change alerts. The two work well together.
Is changing the login URL worth it?
It can cut down automated login attempts, but it's not a substitute for strong passwords and 2FA. Treat it as an optional extra.
How do I know if a plugin has a known vulnerability?
Security plugins and vulnerability databases flag affected versions. The simplest defence is to keep plugins updated and remove any that are no longer maintained.
How often should I review my site's security?
Check updates weekly, and do a quick review of users, plugins and backups every month or two.
The bottom line
Update everything, use strong passwords with 2FA, install only trusted plugins, delete what you don't use, keep backups and monitor your site. Those habits block the vast majority of attacks on WordPress sites.