Skip to content
DevOpsCommand

How to Secure a WordPress Site: A Practical Checklist

Most hacked WordPress sites fall to the same few causes: outdated plugins, weak logins and poor hosting. A practical checklist to close those gaps.

By DevOpsCommand Engineering · · 2 min read

How to Secure a WordPress Site: A Practical Checklist — illustration

WordPress itself is reasonably secure when kept up to date. The sites that get hacked almost always fall to the same few causes: an outdated plugin or theme, a weak or reused admin password, or hosting that lets one compromised site infect the others. This checklist covers those first.

1. Updates: the biggest single win

  • Keep WordPress core, plugins and themes updated. Most attacks use vulnerabilities that already have a published fix.
  • Delete plugins and themes you don't use. Deactivated plugins can still be attacked if their files are on the server.
  • Avoid "nulled" (pirated) premium plugins. They are a common way malware is installed.
  • Update on a staging copy first if the site is important, so an update cannot break checkout or forms in production.

2. Logins

  • Use unique, long passwords and a password manager for every admin account.
  • Turn on two-factor authentication for all administrator and editor accounts.
  • Limit login attempts, and give each person their own account with the lowest role they need. Never share one "admin" login.
  • Remove accounts for staff and agencies who no longer work with you.

3. Hosting and server

  • Run a supported PHP version. Old PHP versions no longer receive security fixes.
  • Each site should run as its own user, so a compromise of one site cannot spread to others on the same server.
  • Use HTTPS everywhere, with automatic certificate renewal.
  • A web application firewall (for example Cloudflare, or a server-level WAF) blocks a large share of automated attacks before they reach WordPress.

4. Configuration hardening

  • Disable file editing in the dashboard by adding define('DISALLOW_FILE_EDIT', true); to wp-config.php.
  • Set correct file permissions: typically 644 for files, 755 for directories and 640 or stricter for wp-config.php.
  • Block PHP execution in the wp-content/uploads directory.
  • Disable XML-RPC if you don't use the mobile app or Jetpack features that need it.

5. Backups and monitoring

  • Keep automatic off-site backups of the database and wp-content, and test a restore regularly. See our guide to the 3-2-1 backup rule.
  • Monitor uptime, and scan for changed files and malware.
  • Check Google Search Console for security warnings. Google often spots injected spam before site owners do.

Signs your site may already be compromised

Unfamiliar admin users, redirects to other sites (often only for mobile visitors or visitors from Google), spam pages in search results, sudden slowness or a hosting provider warning about outgoing spam. If you see any of these, change all passwords, restore from a known-clean backup if possible, and find out how the attacker got in, otherwise they will come back.

Want it handled?

Our website maintenance plans cover updates, backups, monitoring and security hardening, and we clean up and secure sites that have already been hacked. Book a free technical review and we will check your site against this list.

Related articles

Let's talk

Want an engineer to set this up for you?

A 30-minute call. No pressure, no sales pitch — just an engineer looking at what you actually have and telling you what it needs.