wp2shell: more than a month later. Confirm 6.8.6, 6.9.5, 7.0.2. Patched is not clean.

Read the advisory

WordPress Security Best Practices 2026

Practical WordPress security habits for 2026: updates, weak passwords, hosting, brief threat classes, monitoring, and a monthly routine you can keep.

Topics Hardening & checklists Beginner guides

Lars Koudal

Lars Koudal

Updated Published

Best practices are habits, not slogans. The sites that stay boring to attackers usually do the same unglamorous things on a schedule: update, shrink access, scan, restore-test backups.

This post is about routines and judgment calls. For config steps (wp-config, permissions, XML-RPC, .htaccess), use the hardening guide. For a printable tick list, use the security checklist.

WordPress Security Best Practices

Threats worth knowing (brief)

You do not need a threat briefing to stay safe, but naming the usual attack classes helps you prioritize:

Threat classWhat it looks likeFirst defense
Outdated plugins/themesKnown CVE against software still installedUpdate or remove; vulnerability scan
Weak or reused passwordsBrute force / credential stuffing on /wp-login.phpPassword manager + 2FA + login protection
Malware / backdoorsOdd admins, redirects, spam, unexplained file changesMalware scanner, clean restore, then harden
Injected queries (SQLi-style abuse)Often via vulnerable plugins or custom formsKeep plugins current; avoid sketchy code
Host / shared-server issuesNeighbor site or weak stack undermines your plugin workQuality host with restores and support

Deeper reading when something specific hits: vulnerabilities database, plugin security risks, signs you are hacked, SQL injection overview.

1. Keep software current (outdated plugins are the usual door)

  • Update WordPress core promptly, especially security releases
  • Update plugins and themes on a cadence you can keep
  • Delete unused plugins and themes (deactivated is not gone)
  • Keep PHP on a supported version your host and plugins support
  • Prefer auto-updates for trusted, low-risk plugins; stage critical client sites

After a big update week, re-run security tests and a vulnerability scan. Abandoned plugins with no updates in a year are a habit debt: replace or remove them before they become an incident.

2. Treat logins like the front door (weak passwords still win)

  • Unique long passwords in a password manager
  • No shared “team admin” account
  • Few administrators; least privilege for everyone else
  • 2FA for privileged roles
  • Failed-login limits and optional login URL rename via login protection

More: login security guide and password management tips.

3. Be ruthless about plugins and themes

  • Prefer WordPress.org or known commercial vendors
  • Check last update date before install
  • Never use nulled packages
  • One overlapping security stack is enough; three firewalls fight each other

See plugin security risks and plugin conflicts.

4. Hosting and HTTPS as habits, not one-time setup

  • Pick a host with working restores, support, and a current PHP stack
  • Force HTTPS site-wide and renew certificates before they expire (hosts usually automate this; still glance once a quarter)
  • Know how to reach SFTP/SSH or the file manager if wp-admin dies
  • Remove access the day contractors leave
  • Do not log in from emailed “urgent” links

Stores: add coupon/checkout rate limits. See WooCommerce security. Config hardening that sits on top of hosting: hardening guide.

5. Put a firewall in front of WordPress

Block known bad IPs and exploit-shaped requests early. Cloud Firewall is the Pro option in Security Ninja (600M+ bad IPs, country/custom rules). Pair it with updates; a firewall does not patch plugins for you.

Buyer notes: firewall plugins guide.

6. Detect problems early

Scanner types: scanner comparison.

7. Backups you can restore

  • Automatic backups of files and database
  • Off-site copies when possible
  • Retention long enough to go back before an infection started
  • One restore drill per year (or after host changes)

Backup plan and backup vs security plugins.

Practices that fail quietly

Habit that looks fineWhy it fails
Deactivated old plugins left on diskAttackers and scanners still see the files
“We have host backups” never testedRestore day is too late to learn
Three security plugins all “on”Login/WAF features cancel each other
Shared admin password in a chatOne leak becomes every site
“We’ll update after the busy season”Busy seasons are when bots keep working

A monthly routine (strengthen this)

Treat security like bookkeeping: short, boring, scheduled.

Weekly (5 minutes, busy sites)

  1. Apply pending updates you trust, or queue them for staging
  2. Confirm the last automated backup succeeded

Monthly (15 to 20 minutes)

  1. Apply remaining updates; delete leftover plugins/themes
  2. Confirm backups succeeded and retention still makes sense
  3. Glance at Users for unexpected admins or editors
  4. Review vulnerability / malware / security-test findings and close what you can
  5. Skim Events for weird blocks, logins, or spikes
  6. Check Search Console for security warnings
  7. For stores: confirm Woo rate limits and payment plugins still look healthy

Quarterly

  1. One restore test (or watch someone restore)
  2. Revisit who still needs admin
  3. Confirm HTTPS and certificate automation still look right
  4. Re-read the checklist and tick anything that drifted

Printable-style list: security checklist. Beginners path: beginners guide. Hub map: WordPress security guide.

If something already went wrong

Do not “best practice” over active malware. Clean or restore first, then harden. Malware removal or hire cleanup.

Security Ninja covers tests, vulnerability scanning, and core integrity free. Pro adds firewall, malware scanning, scheduled scans, login tools, and WooCommerce protections in one plugin. Pricing if you want the full stack.

Found this useful? Share it.

Larger screenshot