Scanner says core files were modified? Open the diff. After wp2shell, that is often leftover access.

How to read it

WordPress Security Configuration Guide 2026

Configure WordPress security without fluff: wp-config, users, host settings, plugin module order, staging vs production, and links to deeper hardening guides.

Topics Hardening & checklists Beginner guides

Updated Published

WordPress Security Configuration Guide 2026 Open larger image: WordPress Security Configuration Guide 2026

“Configuration” usually means three layers: WordPress itself, your host, and your security plugin. This hub points you to the right layer instead of pasting another 6,000-word hardening essay.

WordPress security configuration

Layer 1: WordPress core settings

Users and roles

  • Limit administrators; use Editor/Author for content staff
  • One account per person; no shared “team admin”
  • Remove contractors the day they finish
  • 2FA on privileged roles

Updates and inventory

  • Enable sensible auto-updates where the site can tolerate them
  • Delete unused plugins and themes (deactivated is not gone)
  • Document what each plugin does before you inherit a client site

Discussion and registration

  • Disable open registration unless the site is a membership product
  • Moderate comments or use anti-spam on public forms

File editing

  • Disable theme/plugin editor in production when you deploy via Git or SFTP (DISALLOW_FILE_EDIT in wp-config.php when appropriate)

Deep dives: best practices, hardening guide, checklist.

wp-config.php security settings (common)

Place custom defines above /* That's all, stop editing! */. Examples many hosts support:

define( 'DISALLOW_FILE_EDIT', true );
define( 'FORCE_SSL_ADMIN', true );

Also protect wp-config.php itself: correct file permissions, never in a public Git repo, rotate salts only with a plan (sessions will reset). More: .htaccess protections on Apache hosts.

Do not paste random hardening snippets from decade-old posts without testing. A bad wp-config line white-screens the site.

Layer 2: Host and server

  • Current PHP supported by WordPress and your plugins
  • TLS on the site; no mixed “HTTP admin” habits
  • File permissions that are not world-writable
  • Host firewall / malware tools as a companion, not a substitute for plugin CVE awareness
  • Know how to reach SFTP/SSH when wp-admin is down
  • Object cache and CDN only after you understand cache purge on security updates

Managed WordPress hosts may lock .htaccess, PHP version, or cron. Use their panel for HTTPS and backups instead of fighting unsupported overrides.

If you only change host settings and never update plugins, configuration theater does not help.

Layer 3: Security Ninja module map

JobWhereWhen to enable
Hardening checksSecurity tests (Free, 50+)Day one
Known vulnsVulnerabilitiesDay one
Core integrityCore scannerAfter updates or suspected tampering
Block bad trafficCloud Firewall (Pro)After baseline clean; tune false positives
Suspicious filesMalware scanner (Pro)On-demand first, then schedule
Login abuseLogin protection + 2FA (Pro)Before rename-login experiments
Store abuseWooCommerce (Pro)When checkout/coupon abuse appears
AlertsWebhooks (Pro)When someone will read them

Ordered install: security plugin setup. Free vs Pro: comparison.

Login and firewall specifics

Login is where most bots burn cycles. Configure lockouts, 2FA, and (if you use it) a renamed login URL carefully so you do not lock yourself out. Guide: WordPress login security.

Firewall rules belong after you understand false positives. Start with the bad-IP list before custom country blocks. Guide: WordPress firewall plugins.

Staging vs production

SettingStagingProduction
Vulnerability scanBefore every deployWeekly or after changes
Firewall geo blocksOptional / looserStricter when justified
2FASame policyRequired for admins
Malware scanAfter importing prod dataScheduled
WP_DEBUGCan be trueShould be false publicly

Never copy production wp-config secrets into a public staging URL without access controls.

Configuration order that rarely bites you

  1. Backup + updates + fewer plugins
  2. Users + passwords + 2FA
  3. Security tests + vuln scan
  4. Firewall + malware schedule
  5. Store-specific limits if needed
  6. Webhooks and audit cadence

Audit cadence: security audit guide. Hub map: WordPress security guide.

Bottom line

Good configuration is boring and documented. Use this page as the map, then do the work in the linked guides. Start Free on WordPress.org or see pricing for Pro.

Found this useful? Share it.

Frequently asked questions

What should I configure first in WordPress security? +

Backups and updates first, then users and passwords with 2FA, then security tests and vulnerability scans, then firewall and scheduled malware scans. Turning on every Pro module on day one on a messy inherited site often causes lockouts.

Where do WordPress security settings live? +

In three layers: WordPress core and wp-config, your host panel and server, and your security plugin. This guide maps which layer owns which job.

Should staging and production have the same security config? +

Same baseline habits, not always identical rules. Staging can use looser firewall geo rules but should still run vulnerability scans before you push to production.

Larger screenshot

Enlarged image