WordPress Security: How Sites Actually Get Hacked and What to Do About It

The most common misconception about security sounds like this: “who would bother with my small site”. It assumes attacks are targeted. In reality the overwhelming majority are automated: a script walks through millions of addresses checking for known vulnerabilities. It does not care whose site it is or how many visitors it has.

So the question is not whether you are interesting to anyone. The question is whether you have an unpatched hole from a well-known list.

How sites are actually compromised

VectorWhat it isWhat closes it
Outdated plugins and themesThe most frequent cause. The vulnerability is published, the update exists, nobody installed itRegular updates
Weak passwordsAutomated guessing of common combinationsLong passwords, two-factor authentication
Abandoned componentsA plugin was deactivated but not deleted. The code is still thereRemoving what is unused
Shared hostingA neighbouring site on the same account was compromisedIsolation, a separate account
Pirated themesA backdoor built into a “free premium theme”Official sources only
Forgotten accessAn account belonging to a contractor who left a year agoA user audit

Note that nothing on this list is exotic. These are not sophisticated attacks, they are doors left open.

Plugins: the main source of risk

An average site runs fifteen to thirty plugins. Each one is somebody else’s code with full privileges inside your site.

Practical rules that remove most of the risk:

  • Fewer means safer. A plugin installed two years ago “to have a look” is an open attack surface providing no benefit at all.
  • Check the last update date. A plugin untouched for a year is most likely abandoned.
  • Deactivating is not deleting. The files of a deactivated plugin stay on the server and in some cases remain reachable from outside.
  • Updating is not a one-off event. Fifteen minutes once a week closes more than any paid protection.

The access nobody remembers

A typical picture at a company with a three-year-old site: eight administrator accounts, two belonging to former employees, one to the contractor who did the redesign, and one called “test”.

What is worth doing right now:

  1. Open the user list and delete everyone you cannot name.
  2. Downgrade roles: most people do not need administrator, editor is enough.
  3. Enable two-factor authentication at least for administrators.
  4. Change hosting and database passwords if they were ever sent over a messenger.

Why small sites get compromised at all

Understanding the motive helps you spot problems earlier. Usually the site is wanted not for itself but as a resource:

  • Sending spam from your domain until it gets blacklisted.
  • Hidden links to third-party sites, visible only to crawlers.
  • Redirects sending mobile visitors to external pages.
  • A phishing page on your domain, because your domain is trusted.
  • Server compute resources.

All these scenarios share one thing: the compromise is meant to stay unnoticed. The site keeps working and the owner learns about it from the hosting provider or a search warning.

The mandatory minimum

MeasureTime requiredWhat it closes
Auto-updates for core and plugins10 minutes onceThe bulk of automated attacks
Two-factor authentication15 minutesPassword guessing and theft
Login attempt limits10 minutesBrute forcing
Off-server backups30 minutesThe consequences of any scenario
User audit20 minutesForgotten access
Deleting unused plugins30 minutesHalf the attack surface

The most important line here is backups, and it is the one most often done for form only. A copy sitting on the same server does not help: in a compromise it disappears along with the site. Backups also need testing, because an unverified restore is not a backup, it is a hope.

Signs a site is already compromised

  • Search results for your company name show pages you did not create.
  • Your host reports exceeding the outbound email limit.
  • The site opens normally for you, but acquaintances report being redirected.
  • New administrator accounts appeared that you did not create.
  • Files with random names sit in the root folder.
  • Search Console sent a warning about harmful content.

What to do if it happens

  1. Do not delete anything immediately: take a copy of the current state first, you will need it for analysis.
  2. Change every password: administrators, hosting, database, FTP.
  3. Restore from a backup taken before the infection, not from yesterday’s.
  4. Update everything: core, themes, plugins.
  5. Delete unknown accounts.
  6. Check the site in Search Console and request a review.

WordPress security is not a product you buy. It is a handful of regular actions, each taking minutes. The difference between a site that held and a site that fell almost always comes down to whether somebody installed the updates and whether a working backup exists off the server.