AI QA Monkey
AI Security Intelligence
WordPress

WordPress Hardening Roadmap 2026: 30-60-90 Day Plan

Most WordPress incidents are preventable with consistent execution. This roadmap prioritizes high-impact controls in phases so teams can reduce risk without pausing delivery.

First 30 days: critical risk reduction

  • Patch WordPress core, plugins, and themes to latest stable versions.
  • Remove inactive plugins/themes and abandoned extensions.
  • Enforce MFA for all admin users and rotate weak credentials.
  • Protect wp-config.php and disable public debug output.
  • Restrict XML-RPC/admin endpoints where business use is unnecessary.

Days 31-60: hardening and visibility

  • Apply security headers and cookie hardening.
  • Limit login attempts and monitor brute-force behavior.
  • Implement file integrity checks for plugin/theme directories.
  • Restrict file editing in admin dashboard.
  • Establish weekly external scan cadence.

Days 61-90: operational maturity

  • Create incident response path for compromised plugin/credential events.
  • Define vulnerability remediation SLA by severity.
  • Track security KPIs: critical findings trend, MTTR, and SLA breaches.
  • Document control evidence for enterprise customer reviews.
# Weekly WordPress security routine
1) Run external scan
2) Review high/critical findings
3) Patch and verify
4) Re-scan and log closure evidence

Critical wp-config.php security constants

// Add to wp-config.php
define( 'DISALLOW_FILE_EDIT', true );       // Disable theme/plugin editor
define( 'DISALLOW_FILE_MODS', true );       // Block all plugin/theme installs
define( 'FORCE_SSL_ADMIN', true );          // Force HTTPS for admin
define( 'WP_DEBUG', false );                // Disable debug output in production
define( 'WP_DEBUG_LOG', false );            // No debug log file
define( 'DISALLOW_UNFILTERED_HTML', true ); // Restrict HTML in posts

Restrict xmlrpc.php and wp-login.php

Add to .htaccess to block XML-RPC abuse and brute-force login attempts:

# Block XML-RPC
<Files xmlrpc.php>
  Order deny,allow
  Deny from all
</Files>

# Limit wp-login.php to trusted IPs
<Files wp-login.php>
  Order deny,allow
  Deny from all
  Allow from YOUR.TRUSTED.IP
</Files>

Server-level hardening for WordPress

Hardening WordPress is not only about what happens inside the admin panel. The server configuration beneath WordPress controls which files are executable, which paths are accessible, and how requests are filtered before they ever reach PHP.

  • Disable PHP execution in uploads: The wp-content/uploads/ directory should never execute PHP. Add a .htaccess inside that directory: php_flag engine off (Apache) or a location block denying PHP execution (Nginx).
  • Hide the WordPress version: Remove the generator meta tag and RSD link from functions.php using remove_action('wp_head', 'wp_generator'). Fingerprinting the exact version is the first step attackers use to match known CVEs.
  • Protect sensitive files via .htaccess: Block direct access to wp-config.php, readme.html, license.txt, and wp-includes/ PHP files.
  • Disable directory listing: Ensure Options -Indexes is set globally to prevent directory browsing that reveals plugin and theme names.

Plugin and theme security discipline

More than 90% of WordPress compromises originate from vulnerabilities in plugins and themes, not WordPress core. The attack surface grows with every extension installed.

  • Audit installed plugins quarterly: Remove any plugin that has not been updated in 12+ months, has fewer than 1,000 active installs, or lacks a disclosed security contact.
  • Monitor the WPScan Vulnerability Database: Subscribe to alerts for plugins you depend on. Known vulnerabilities are published within hours of disclosure.
  • Use a staging environment for updates: Never update plugins directly on production without testing. A broken update to a caching or security plugin can take the site offline.
  • Prefer fewer, well-maintained plugins: Each plugin adds PHP code executed on every request. Consolidate functionality where possible — a single page builder with security support is better than five micro-plugins.

Database hardening

The default WordPress table prefix wp_ is known to every attacker. Changing it during setup (or via migration) adds a minor but meaningful layer of obscurity against automated SQL injection tools.

  • Set a unique table prefix in wp-config.php: $table_prefix = 'xk7m_';
  • Create a dedicated MySQL user for WordPress with only SELECT, INSERT, UPDATE, DELETE privileges — never root.
  • Disable LOAD DATA INFILE on the MySQL server to block file read attacks via SQL injection.
  • Schedule daily automated backups stored off-site (S3, Backblaze, or equivalent). Test restore procedures monthly.

User and authentication hardening

Credential attacks against WordPress admin accounts are the most common attack vector after plugin vulnerabilities. Brute-force, credential stuffing, and phishing are all active threats.

  • Rename the admin username: The default admin username is targeted in every automated WordPress attack. Create a new admin account with a unique username and delete the default.
  • Enforce strong passwords via policy: Use a plugin like WP Password Policy Manager or implement password strength enforcement in functions.php.
  • Mandatory MFA for all admin-level users: Use TOTP-based MFA (Google Authenticator, Authy). Avoid SMS-based 2FA due to SIM swap risks.
  • Limit login attempts: Block IPs after 5 failed attempts. WP Cerber, Wordfence, or a WAF rule can implement this without a dedicated plugin.
  • Monitor user role changes: Unexpected privilege escalations (subscriber → admin) are a key indicator of compromise.

Security monitoring and alerting

A hardened WordPress site without monitoring is a static snapshot, not a security posture. Attackers probe continuously — detection time directly determines breach impact.

  • Set up weekly automated external scans with AI QA Monkey WordPress Scanner to catch new exposures after plugin updates.
  • Enable WordPress core file integrity checks — compare checksums against the official WordPress.org release.
  • Configure email alerts for: new admin user creation, plugin activation/deactivation, file changes in core directories, and failed login spikes.
  • Review access logs weekly for patterns: repeated 404s on wp-login.php, requests to xmlrpc.php, and probing for backup files (.sql, .zip).

Backup strategy: the last line of defense

Every other hardening control reduces the probability of compromise. A working backup is the only control that guarantees recovery when every other control fails. A backup strategy that has not been tested is not a backup strategy.

  • Backup frequency: Daily automated backups for active sites. High-traffic e-commerce sites should run backups every 4-6 hours or after significant transaction volumes.
  • Backup scope: Files and database together. A file backup without the database (or vice versa) cannot produce a complete restore. Test the restore of both components together.
  • Off-site storage: Store backups in a separate cloud account (S3, Backblaze B2, Cloudflare R2). Backups on the same server are destroyed in the same incident that destroys the site.
  • Retention policy: Keep 30 days of daily backups minimum. Some malware infections are not detected for weeks — the ability to restore to a pre-infection state requires sufficient history depth.
  • Test restore quarterly: Spin up a staging environment from backup and confirm the site loads, the database is intact, and all media is present. Document the restore time — this becomes your Recovery Time Objective (RTO) for incident response planning.
  • Immutable backup copy: At least one backup copy should be write-protected (S3 Object Lock, Backblaze immutable buckets). Ransomware that gains access to backup storage will encrypt or delete backups — immutable storage prevents this.

WordPress hardening tools: plugin vs. server-level

Security plugins (Wordfence, WP Cerber, iThemes Security) are accessible but have important limitations. Server-level hardening is more reliable and cannot be disabled by an attacker who gains WordPress admin access.

  • Server-level is always preferred: An .htaccess rule blocking XML-RPC cannot be removed by an attacker with WordPress admin access. A plugin rule blocking XML-RPC can be disabled by deactivating the plugin.
  • Use plugins for monitoring, not enforcement: Security plugins excel at login attempt monitoring, file integrity checking, and alerting. Use them for detection. Use server configuration for enforcement.
  • WAF at the CDN layer: Cloudflare, Sucuri, or Fastly WAFs inspect traffic before it reaches your server. This is the most scalable defense against volumetric attacks, credential stuffing, and known exploit patterns — and it cannot be bypassed by attacking the WordPress layer.
  • One security plugin only: Multiple security plugins conflict and create false confidence. Choose one, configure it fully, and monitor its alerts. Redundant plugins also add performance overhead on every page load.

Related hardening guides

Run a WordPress security scan now

Get plugin risk, admin exposure, wp-config findings, and hardening gaps in under 60 seconds.

Scan WordPress Site

Check Your Website Right Now

Run a free automated security scan — 75 checks in 60 seconds. No signup required.

Run Free Security Scan →