In 27 years of managing WordPress sites, I’ve seen every security exploit imaginable. Here’s the complete security checklist that actually works, based on real-world experience with thousands of compromised sites.
The Security Mindset
WordPress security isn’t about installing plugins and forgetting it. It’s about layered defense, ongoing vigilance, and understanding that attackers constantly evolve their methods. Most WordPress sites get hacked not because of sophisticated zero-days, but because of basic negligence.
The goal isn’t to make your site “unhackable”—that’s impossible. The goal is to make your site an unattractive target and have systems in place to detect and recover from attacks quickly.
Server-Level Security (Items 1-10)
- Choose a secure hosting provider. Avoid “unlimited” hosting plans that share resources with thousands of other sites. Look for providers that offer server-level isolation, automatic malware scanning, and managed security. Note: If your host doesn’t offer malware scanning, it’s time to switch.
- Keep WordPress core, plugins, and themes updated. WordPress core updates include security patches. Plugin and theme updates fix vulnerabilities. Use automatic updates for minor releases and test major updates on a staging site first.
- Use HTTPS everywhere. SSL/TLS is non-negotiable in 2026. Use Let’s Encrypt for free certificates or a premium provider for advanced features. Configure your server to redirect all HTTP traffic to HTTPS.
- Implement proper file permissions. Directories should be 755, files 644, wp-config.php 440. Never use 777 on production servers. This prevents attackers from modifying your files if they gain access.
- Disable directory listing. Add this to your .htaccess file: Options -Indexes. This prevents attackers from seeing what files are in your directories.
- Set up Web Application Firewall (WAF). Cloudflare offers a free WAF that blocks common attack patterns. For enterprise needs, consider Sucuri or Wordfence’s premium WAF. A WAF stops attacks before they reach your WordPress installation.
- Change default database prefix. If you’re installing a new site, don’t use the default wp_ prefix. This makes SQL injection attacks slightly harder, as attackers can’t easily guess your table names.
- Implement IP blocking. Block known malicious IP ranges at the server level. Tools like Fail2Ban can automatically detect and block suspicious activity.
- Disable PHP execution in certain directories. Add this to your .htaccess file to prevent PHP execution in upload and other sensitive directories:
Order allow,deny
Deny from all
php_flag engine off
- Set up log monitoring. Monitor your server logs for suspicious activity. Use tools like Loggly or Graylog for centralized logging, or simple scripts to email you when there are failed login attempts.
WordPress Configuration Hardening (Items 11-20)
- Change default admin username. Never use “admin” as a username. If you have one, create a new admin user with a different name and delete the old one. This eliminates a known attack vector.
- Use strong passwords. Every WordPress user account should have a unique, randomly generated password of 16+ characters. Use a password manager like 1Password or Bitwarden. No exceptions.
- Enable two-factor authentication. Install Wordfence Login Security (free) or WP 2FA. Every admin account should have 2FA enabled—even you. This blocks credential stuffing attacks.
- Limit login attempts. Install a rate-limiting plugin or configure this at the server level. After 3-5 failed attempts, block the IP for 15-30 minutes. This prevents brute force attacks.
- Change the login URL. Move wp-login.php to a custom URL using a plugin like WPS Hide Login. This stops 90% of automated brute force attacks that look for wp-login.php.
- Disable XML-RPC. Unless you specifically need it (for remote publishing or Jetpack), block xmlrpc.php entirely. It’s a common attack vector for brute force amplification attacks.
- Disable REST API for unauthenticated users. The WordPress REST API exposes user data and site information to anyone. Restrict it with a plugin or custom code to prevent data harvesting.
- Block user enumeration. Prevent attackers from discovering usernames through
/?author=1queries and REST API endpoints. Use a security plugin or custom code to block these. - Disable file editing in the admin. Add
define('DISALLOW_FILE_EDIT', true);to wp-config.php to prevent anyone from editing theme and plugin files through the WordPress dashboard. - Disable plugin/theme installation from admin. For production sites, add
define('DISALLOW_FILE_MODS', true);to prevent plugin/theme installation through the admin. Manage updates via WP-CLI or your management tool.
Database Security (Items 21-25)
- Secure database credentials. Use strong, unique database username and password. Don’t use “root” with a simple password. Store credentials in wp-config.php, not in theme files or plugins.
- Regular database backups. Schedule automated daily backups with plugins like UpdraftPlus or BackWPup. Store backups off-site, not on your server. Test your backups regularly to ensure they work.
- Limit database user privileges. Don’t use “all privileges” for your WordPress database user. Grant only the minimum necessary permissions: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX.
- Protect wp-config.php. Move wp-config.php one directory above your web root. WordPress automatically looks there for the config file, making it inaccessible via the web server.
- Implement database prefix. If not already done, change the database prefix from wp_ to something custom. This makes SQL injection attacks more difficult as attackers can’t easily guess table names.
Plugin & Theme Security (Items 26-30)
- Only install reputable plugins and themes. Avoid nulled plugins/themes—they often contain backdoors. Only download from official repositories or trusted vendors. Check reviews, ratings, and update frequency before installation.
- Regularly audit installed plugins. Remove unused plugins—they create security risks even when inactive. Use a plugin like Plugin Health Check to identify potentially problematic plugins.
- Monitor plugin vulnerabilities. Subscribe to security feeds like WPScan or Patchstack to get notified about vulnerabilities in your installed plugins. Have a process for applying critical patches within 24 hours.
- Use security plugins wisely. Install Wordfence Security or Sucuri Security. Configure them properly—they’re only effective if configured correctly. Don’t install multiple security plugins as they can conflict with each other.
- Implement a staging environment. Test all plugin and theme updates on a staging site before deploying to production. This catches compatibility issues and potential security problems before they affect your live site.
Advanced Security Measures
Security Scanning and Monitoring
Even with all these measures, you need active monitoring. Use security scanning tools that check for:
- Malware and backdoor files
- Suspicious database entries
- Unauthorized file modifications
- Suspicious user registrations
- Performance anomalies that might indicate attacks
Set up automated scans to run daily and configure alerts for critical findings.
Incident Response Plan
When your site gets compromised (it will happen), you need a plan:
- Isolate: Take the site offline or restrict access
- Identify: Determine the entry point and scope of the breach
- Contain: Remove malicious files and block attackers
- Restore: Clean the site and restore from backups
- Prevent: Patch the vulnerability and implement additional measures
Security Automation
For managing multiple sites, automate security tasks:
- Automated vulnerability scanning across all sites
- Automated patch application for critical vulnerabilities
- Automated security report generation for clients
- Automated backup verification
- AI-powered threat detection and response
Common Security Myths
Myth: “My site is too small to be targeted.”
Reality: Automated bots scan millions of sites daily looking for easy targets. Basic negligence makes you a target.
Myth: “Security plugins make me completely safe.”
Reality: Security plugins are tools, not magic. They need proper configuration and don’t compensate for poor practices.
Myth: “I’ll know if my site is hacked.”
Reality: Many hacks are silent—they steal data or send spam without your knowledge. Regular security scanning is essential.
Myth: “HTTPS is enough security.”
Reality: HTTPS encrypts data in transit but does nothing to protect your site from attacks or malware.
Final Checklist
Before considering your site “secure,” ensure you have:
- ✅ All software updated
- ✅ Strong passwords with 2FA
- ✅ HTTPS enabled
- ✅ Web Application Firewall
- ✅ Regular backups tested
- ✅ Security plugins configured
- ✅ File permissions set correctly
- ✅ Login attempts limited
- ✅ File editing disabled
- ✅ Monitoring and alerts active
Resources
- WordPress Hardening Guide – Official WordPress security documentation
- Sucuri Blog – Security news and WordPress-specific guidance
- Wordfence Blog – Security research and WordPress vulnerability reports
- WordPress Vulnerability Database – Track known vulnerabilities in WordPress core, plugins, and themes
WordPress security is an ongoing process, not a one-time setup. Implement these measures systematically, test regularly, and stay current with security best practices. Your site—and your visitors—depend on it.


