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

Read the advisory

Protect a WordPress website: six practical defenses

Six concrete ways to protect WordPress: passwords and 2FA, updates, file permissions, backups, monitoring, and fewer administrators.

Topics Hardening & checklists Beginner guides

Lars Koudal

Lars Koudal

Updated Published

WordPress is a common target because it is common, not because it is uniquely weak. Most takeovers still come from guessed passwords, outdated plugins, or leftover administrator accounts. These six defenses remove a large share of that risk.

Deeper playbooks: security checklist, hardening guide, login security.

1. Unique passwords and 2FA

Use a password manager. Every admin (and every site) gets its own long random secret. Turn on two-factor authentication for administrators and anyone who can install plugins.

Memorable sentence passwords help some people. Random manager passwords help more. Avoid shared “company admin” logins in chat threads.

Related: password tips, common weak admin passwords.

2. Keep core, themes, and plugins updated

Unpatched plugins are the usual entry point. Update on a schedule. Delete what you do not use, including deactivated leftovers. Scan installed software for known issues with a vulnerability scanner.

3. Sensible file permissions

Typical defaults: directories 755, files 644, and a tighter wp-config.php when the host allows it. Never use 777 to silence an installer error.

Step-by-step: fix file and folder permission errors.

4. Backups you can actually restore

Security reduces probability. Backups reduce impact. Keep automated offsite copies of files and the database, and test a restore once. Guide: WordPress backup tips.

5. Watch for surprise changes

Unknown admin users, modified plugin files, and odd login spikes are early warnings. Use activity logging and malware scanning. Security Ninja’s Events Logger and malware scanner are built for that job.

If you are already compromised: hacked site steps.

6. Fewer administrators

Every administrator is a phishing target who can install malware. Give editors and authors the lowest role that works. Review Users monthly. Details: WordPress user roles.

Quick priority order

  1. Unique passwords + 2FA on admins
  2. Updates and delete unused plugins
  3. Offsite backups
  4. Firewall / login rate limits
  5. Monitoring

You will not make a public site unhackable. You can make opportunistic attacks noisy, expensive, and recoverable.

Found this useful? Share it.

Larger screenshot