Faragiri

Learn Hardening WordPress WordPress

The five causes that account for most WordPress compromises, the two that are specific to this platform, and why a security plugin's green ticks address none of them.

4Sections
3Min read
5Depth

Five layers, one site

What each measure stops, and what it does not

The layers are in the order they are usually installed, which is close to the reverse of the order they are worth.

  1. A security plugin's firewallAutomated scans matching known request patternsAnything using a valid login, and any vulnerability it has no rule for
  2. Two factor on administratorsEvery stolen or reused password, which is a whole classA vulnerability in a plugin, which needs no login at all
  3. Automatic plugin updatesThe largest cause, within hours rather than a monthAn abandoned plugin, where there is no update to apply
  4. No execution in uploadsA shell uploaded through a vulnerable form from runningAnything written into a directory that is meant to execute
  5. DISALLOW_FILE_EDITA stolen admin session becoming code in one clickA plugin install, which is the other way to add code from the admin
the database, and the files that can execute

The outermost layer is the one most often bought and the one that stops least. Nothing on this figure addresses an administrator account nobody removed, which is why the monthly question matters more than the configuration.

WordPress core is not usually what is broken into. The attacks that succeed
arrive through a plugin nobody updated, a password that was reused, or a file
upload that was allowed to execute, and the ranking matters because effort spent
on the wrong one is wasted.

Two facts set the shape. A site is scanned constantly, by automated tools
that fingerprint the version of every plugin and try known vulnerabilities
against them, which is why an unpatched plugin is exploited within days rather
than eventually. And a compromise usually goes unnoticed, because the payload is
spam links in the database or a mailer, not a defaced homepage.

The five that account for most of it

  • An out of date plugin. The single largest cause. Enable
    automatic updates for plugins, and delete the ones that are deactivated, because
    a deactivated plugin's files are still reachable
  • Weak or reused admin passwords. Two factor authentication
    on every administrator account removes this class outright
  • Uploads that can execute. A PHP file in
    wp-content/uploads should never run, and denying execution in that
    directory at the server is one rule
  • File editing from the admin.
    define('DISALLOW_FILE_EDIT', true) in wp-config removes the plugin
    and theme editors, so a stolen admin session cannot become code execution in one
    click
  • Everything running as one user with full permissions.
    Editors do not need the administrator role, and an integration account should
    have the least role that works

Two more that are specific to this platform

The REST user route lists every publishing account's display name and slug
without authentication, which is a list of valid usernames handed to a login
attacker. It is on by default and worth filtering.

xmlrpc.php answers requests that can attempt many logins in one
call, which is why it appears in every brute force log. If nothing you run uses
it, and most sites use nothing that does, it should be blocked at the server
rather than by a plugin, because a plugin loads after WordPress has already
parsed the request.

Recovering from one is its own subject and the short version is that
cleaning is not enough. A compromise usually installs more than one way back in:
an extra administrator account, a scheduled event, a modified core file and a
backdoor in the uploads directory are the common set, and removing the visible
symptom leaves the rest. Restore from a backup taken before the intrusion, then
apply the updates that would have prevented it, then rotate every credential
including the database password and any application passwords.

What to run in 2026

Automatic background updates for plugins are the tool, free and built into
WordPress, and the reason to prefer them over a maintenance schedule is the
timing above: the window between a disclosure and an exploit attempt is days. It
replaced updating on a monthly visit, which is a month of exposure per
release.

WPScan's vulnerability database is the second, free for small use, and it
answers whether the versions you are running have known problems rather than
whether they are current. It replaced assuming that up to date and safe are the
same thing, which they are not when a plugin is abandoned and its last version
is vulnerable.

Where this stalls people

The stall is buying a security plugin and treating the checklist it shows as
the work. Those plugins do real things, and none of them updates an abandoned
plugin, chooses a role, or stops an administrator reusing a password. The plugin ticks are about configuration, and the compromises are about the
five causes above.

The question worth asking monthly instead: what is installed, is any of it
abandoned, and who has an administrator account. Three answers, ten minutes, and
they address the causes rather than the settings. The code being executed is
hooks, filters and
writing your own
, the endpoint doing the enumerating is
WordPress as a
backend for something else
, and the general versions of these attacks are
the attacks every public site
receives
, inside
what runs a large share of the
web
.

Alongside this

Above this