Most hacked WordPress sites are not compromised through a sophisticated flaw, but because a basic security point was neglected. Bots scan the web continuously looking for these weak spots: a small site is not spared because it is small. Here, in order of importance, is what to check, and how.

1. Updates, without exception

WordPress core, theme and plugins: every security update that gets published makes the fixed flaw public. A site that falls behind becomes an easy target, found automatically.

2. Serious passwords and access

To quickly list administrators with WP-CLI:

wp user list --role=administrator --fields=ID,user_login,user_email

An administrator nobody recognizes is a red flag.

3. Regular, tested backups

Perfect security does not exist: what really protects you is being able to roll back quickly to a clean version. You need backups of the database and files, kept off the server, over several days, and already tested: see the backup rule almost nobody follows.

4. Carefully chosen plugins

Every active plugin is a potential entry point.

5. A firewall and login attempt limits

Blocking repeated login attempts and filtering suspicious traffic before it reaches WordPress greatly reduces the attack surface, without daily manual work. A web application firewall can sit in front of the site (Cloudflare, for example) or be installed as a plugin.

6. A hardened configuration

A few settings to apply once:

define( 'DISALLOW_FILE_EDIT', true );

Warning signs

In that case, act quickly: change every password, restore a clean backup, update everything, then find how the attack got in and close that door. The later the intervention, the longer and more uncertain the clean-up.

The checklist

  1. Core, theme and plugins up to date; unused themes and plugins deleted.
  2. Unique passwords, two-factor authentication for administrators, unused accounts removed.
  3. Backups off the server, over several days, tested.
  4. Maintained plugins, never a pirated copy.
  5. Firewall and login attempt limits.
  6. File editor disabled, strict file permissions, HTTPS, XML-RPC disabled if unused.

Going further: my expertise: Freelance WordPress developer · read also: 5 reasons your WordPress site is slow (and how to fix it)