How to Secure WordPress
Concrete measures to harden your WordPress site against the most common threats
WordPress powers over 40% of the web, making it the primary target for automated attacks. Most compromised WordPress sites were not victims of sophisticated hacking — they fell to outdated plugins, weak passwords or default configurations that were never changed.
The good news is that securing WordPress does not require cybersecurity expertise. With a combination of disciplined updates, correct configuration and the right tools, you can drastically reduce the attack surface.
Keep everything updated at all times
WordPress core, plugin and theme updates are not just functional — they are security patches. Each version fixes known vulnerabilities that attackers actively exploit. According to WPScan, over 90% of WordPress vulnerabilities come from plugins and themes, not the core.
Enable automatic core updates and consider doing the same for trusted plugins. For critical or custom plugins, apply updates in a staging environment before production. Remove any plugin or theme you are not actively using.
Essential security plugins
A well-configured security plugin adds protection layers that WordPress does not include by default. You do not need five different plugins — one comprehensive, well-maintained plugin is sufficient.
- Wordfence: integrated web application firewall, malware scanning and brute-force protection
- Sucuri Security: file integrity monitoring, activity auditing and DNS/CDN firewall
- iThemes Security: automated hardening, file change detection and login protection
- WP Activity Log: detailed logging of all dashboard activity for auditing and compliance
Server and WordPress hardening
Hardening reduces the attack surface by removing unnecessary functionality and reinforcing configurations. Many of these measures are applied once and provide permanent protection.
- Change the database table prefix (do not use the default wp_)
- Disable file editing from the dashboard: define('DISALLOW_FILE_EDIT', true)
- Hide the WordPress version by removing the meta generator tag
- Protect wp-config.php and .htaccess with restrictive permissions (400 or 440)
- Block direct access to xmlrpc.php if you do not need it (a common brute-force target)
- Limit login attempts and block IPs after failed tries
Robust authentication and 2FA
Brute-force attacks against wp-login.php are constant on any public WordPress site. Protecting dashboard access is one of the highest-impact measures you can take.
Implement two-factor authentication (2FA) for all users with administrative permissions. Use unique, strong passwords — preferably generated by a password manager. Consider changing the default login URL to avoid automated attacks.
WAF and CDN as the first line of defence
A Web Application Firewall (WAF) filters malicious traffic before it reaches your server. Combined with a CDN, it protects against DDoS attacks, injections and exploitation of known vulnerabilities. Cloudflare offers a free plan with basic protection that is already significant for most WordPress sites.
Sucuri and Cloudflare are the most popular options for WordPress. Both offer WordPress-specific rules that block known attack patterns without manual configuration.
Backups and recovery plan
No security measure is infallible. Backups are your last line of defence when everything else fails. They should be automatic, frequent, stored off-server and verified periodically.
- Schedule daily database backups and weekly full backups (files + DB)
- Store copies in at least two external locations (S3, Google Drive, remote server)
- Test restoration at least once a quarter to verify that backups work
- Use plugins like UpdraftPlus, BlogVault or BackupBuddy to automate the process
Continuous monitoring
Detecting an incident quickly is the difference between a minor issue and a crisis. Monitor availability, file changes, failed login attempts and malware presence.
Set up email or Slack alerts for critical events. Use UptimeRobot or Pingdom to monitor uptime and Google Search Console to detect if your site has been flagged as dangerous.
Key Takeaways
- Over 90% of WordPress vulnerabilities come from outdated plugins and themes
- One well-configured security plugin covers most needs
- Server and WordPress hardening is applied once and protects permanently
- 2FA on all administrative accounts drastically reduces the risk of unauthorised access
- Verified backups are the essential last line of defence
Does your WordPress need a security review?
We audit your WordPress installation, apply professional hardening and set up a maintenance plan to keep your site protected.