Most hacked WordPress sites are not targeted personally. They are found by automated bots scanning the web for outdated plugins, weak passwords and common misconfigurations. That is good news, because it means a handful of well-known measures stop the vast majority of attacks. This is the hardening checklist I apply to every site I build or take over, in order of impact.
Keep everything updated
Outdated plugins and themes are the most common way attackers get into WordPress sites. Once a vulnerability is published, bots start scanning for it within days. Update WordPress core, plugins and themes promptly, test major updates on staging and apply security releases as soon as possible.
Remove plugins and themes you do not use, including inactive ones, because they can still be exploited. Keep one default theme as a fallback. My guide to updating WordPress safely explains a routine that avoids breaking the site.
Strong passwords and unique usernames
Every account with access to the dashboard, hosting, database or SFTP needs a long, unique password, ideally generated and stored in a password manager. Avoid the username admin and do not use your public display name as your login name.
Reused passwords are dangerous: if one service is breached, attackers try the same details everywhere. A password manager for your team makes strong, unique passwords practical for everyone.
- UpdatesCore, plugins, themes
- 2FAEvery admin account
- FirewallPlugin, host or edge
- Least privilegeRight role for each user
- Off-site backupsTested restores
- No nulled softwareOfficial sources only
Two-factor authentication
Two-factor authentication (2FA) requires a second proof of identity, such as a code from an authenticator app, when logging in. Even if a password is stolen, the attacker cannot log in without the second factor. Enable it for every administrator, editor and shop manager.
Plugins such as Wordfence, Solid Security and dedicated 2FA plugins add this easily. Store backup codes safely in case a phone is lost. See securing WordPress logins.
Limit login attempts
Bots repeatedly try usernames and passwords on wp-login.php, which wastes server resources and occasionally succeeds against weak passwords. Limiting attempts and temporarily blocking repeat offenders stops most of this traffic.
Combine login limits with a firewall, CAPTCHA on login if needed and disabling XML-RPC where it is not used. My guide to brute force attack protection covers each option.
Use a firewall
A web application firewall filters malicious requests before they reach WordPress, blocking known attack patterns, bad bots and exploit attempts against vulnerable plugins. It can run at the plugin level, on your host’s servers or at the network edge through a service such as Cloudflare or Sucuri.
Edge firewalls stop attacks before they use your server’s resources. My guide to whether you need a WAF compares the options.
Least-privilege user roles
Give each person only the access they need. Content writers need Author or Editor, not Administrator. Store staff need Shop Manager. Remove accounts for people who no longer work with you, and review the user list every few months.
Fewer administrators means fewer accounts that can install plugins or change settings if compromised. See WordPress user roles.
Secure hosting and HTTPS
Choose hosting that isolates accounts, patches servers quickly, runs current PHP versions and offers malware scanning. Serve the whole site over HTTPS with a valid certificate and redirect all http traffic.
Old PHP versions no longer receive security fixes. See choosing WordPress hosting and setting up SSL and HTTPS.
Backups you can restore
Backups are your safety net when everything else fails. Keep daily backups of files and the database, with at least one copy stored off-site in a separate account. Test a restore at least twice a year.
After a hack, a clean backup from before the infection can save days of cleanup. See a backup strategy that works.
File permissions and editing
Set file permissions so that files cannot be modified by unauthorised processes, typically 644 for files and 755 for folders, with tighter permissions for wp-config.php. Disable the built-in theme and plugin editor by adding DISALLOW_FILE_EDIT to wp-config.php.
If an attacker gains admin access, a disabled editor stops them injecting code through the dashboard. See WordPress file permissions.
Security headers
HTTP security headers tell browsers how to behave when loading your site: forcing HTTPS, preventing clickjacking, blocking content type sniffing and controlling which scripts can run. They add protection against several common attacks.
Headers can be set at the server, through a CDN or with a plugin. See HTTP security headers for WordPress.
Avoid nulled and untrusted software
Nulled themes and plugins, pirated copies of premium products, are one of the most common sources of malware. They often contain hidden backdoors that give attackers control of the site. Only install software from WordPress.org or the official developer.
Check plugins before installing: recent updates, active installs, support responses and compatibility. See why nulled themes and plugins are dangerous.
Monitor and review
Set up uptime monitoring, malware scanning and an activity log that records logins, plugin changes and content edits. Alerts let you respond quickly when something unusual happens. Review security as part of monthly maintenance.
If you would like this checklist applied and monitored for you, it is part of my website protection service. For a structured review of an existing site, see my WordPress security audit.
Key takeaways
- Outdated plugins and weak passwords cause most WordPress hacks.
- Two-factor authentication and login limits stop most account attacks.
- A firewall, secure hosting and HTTPS add layers of protection.
- Backups and monitoring let you recover quickly when something goes wrong.
Frequently asked questions
Is WordPress secure?
WordPress core is well maintained and secure. Most hacks come from outdated plugins, weak passwords and poor hosting, which this checklist addresses.
Do I need a security plugin?
Most sites benefit from one for firewall rules, login protection and scanning, unless your host provides equivalent protection.
How often should I check security?
Review updates weekly and run through the full checklist monthly as part of maintenance.
Will security plugins slow my site?
Well-configured ones have little impact. Edge firewalls can even reduce server load by blocking bad traffic.
Should I hide my WordPress version?
It does little on its own. Keeping WordPress updated matters far more than hiding the version number.
What is the single most important step?
Keeping plugins, themes and core updated, followed closely by strong passwords with 2FA.
