WordPress Security ServicesMalware Removal
Entry Points

How Did My WordPress Site Get Hacked? The Most Common Ways In, and How to Find Yours

"How did they even get in?" is the question every hacked site owner asks, and the one that matters most. Remove the malware without answering it and the attacker simply comes back the same way. Here are the ways WordPress sites actually get hacked, roughly in order of how often I see them, and how to work out which one hit yours.

Sergey By Sergey, WordPress security specialist Updated 3 min read
In this guide
  1. The most common ways in
  2. How to find out how your site was hacked
  3. Make sure it can’t happen again

The most common ways in

Diagram: eight ways into a WordPress site, grouped as code you installed (outdated plugin or theme, nulled software, supply-chain attack, file manager plugin, insecure custom code), logins (stolen or reused passwords) and the hosting (another infected site in the account, server-level problems), plus five steps to find which one hit your site.
The eight entry points by route. The numbers match the sections below, roughly in order of how often I see them.

1. An outdated plugin or theme with a known vulnerability

By far the most common. A security hole is found and published, a fix is released, and bots start scanning for sites that haven’t updated, often within days. Page builders, form plugins, sliders and file managers are frequent examples, simply because they’re popular and complex.

2. Stolen, weak or reused passwords

An admin password that was also used on another site that got breached, or a weak hosting or FTP password. Attackers try leaked credentials automatically and in bulk.

3. Nulled (pirated) themes and plugins

“Free” copies of premium software often come with a backdoor already inside. The site is compromised the moment you install it. See WP-VCD malware for the best-known example.

4. Supply-chain attacks

A genuine plugin update, or a trusted management service, delivers malware. That happened in October 2026 with Rank Math PRO and UpdraftCentral. There have also been cases where a plugin was sold to a new owner who added malicious code in an update. Rare, but very hard to defend against.

5. Another infected site in the same hosting account

On shared hosting, sites under the same user can usually write to each other’s files. An old, forgotten site or staging copy gets hacked and infects everything next to it.

6. File manager and “maintenance” plugins

Plugins that let you edit files from the dashboard are powerful, which makes them a favorite target when they have vulnerabilities. They’re best removed once you’re done with them.

7. Insecure custom code

Custom themes and plugins, increasingly AI-generated ones, with missing input checks or unsafe file uploads.

8. Server-level problems

An outdated PHP version, a vulnerable control panel, or a compromised hosting account. Less common, but they happen, and no WordPress plugin can protect against them.

How to find out how your site was hacked

  1. Find the oldest malicious file. From your infected backup, check modification dates: ls -la --time-style=full-iso. The earliest one is closest to the break-in. Keep in mind that malware sometimes fakes dates.
  2. Read the access logs around that time. Look for POST requests to plugin files, unusual URLs, or logins from unfamiliar IPs. The plugin folder named in those requests is often your culprit.
  3. Check your plugin versions against vulnerability databases such as WPScan, Patchstack or Wordfence Intelligence.
  4. Look at the admin users: when the unknown ones were created, and which account was used to create them.
  5. Check for nulled software and for other sites in the account.

You won’t always get a 100% certain answer. Logs may be missing, or there may be several weaknesses. But there’s almost always a most-likely cause, and fixing it is what stops the next hack.

From my cleanup work: in most cleanups, the logs tell the story within minutes: a burst of POST requests to one plugin’s folder, followed by a new PHP file appearing in uploads, followed by a new admin user. The plugin is usually one that’s been out of date for months. Updating it is a one-click fix that would have prevented the whole thing.

Make sure it can’t happen again

Work through how to secure WordPress after a hack and the WordPress security checklist. If you’d like an expert to look for weak spots before an attacker does, a security audit costs $70.

Sergey, WordPress Security Specialist
About the author
Sergey, WordPress Security Specialist

10 years in WordPress security and incident investigation, and more than 200 websites cleaned of malware. Top Rated on Upwork with a 100% Job Success score. More about me

Frequently Asked Questions

Is WordPress itself insecure?

WordPress core is well maintained, and serious core vulnerabilities are rare and patched quickly. Security researchers consistently find that the vast majority of WordPress vulnerabilities are in plugins and themes. Most hacked sites I see were running something outdated.

My site was small and unimportant. Why would anyone hack it?

Almost nobody targets a specific small site. Bots scan the whole internet for known vulnerable plugins and weak passwords, and hack whatever they find. Your site's value is its server, its traffic and its reputation in Google.

Can a deactivated plugin get my site hacked?

Yes. A deactivated plugin's files are still on the server and can often still be reached directly. If it has a vulnerability, it can be exploited. Delete plugins you don't use.

Can a site get hacked even with two-factor authentication?

Yes. Two-factor login stops stolen passwords, but it doesn't help against a vulnerable plugin, a compromised update, or a backdoor already on the server. It's essential, but not enough on its own.

Need a hand?

Let me clean your WordPress site for you

Send me your site URL and what you're seeing. I'll reply with what I think is going on and the next step.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Get My Site Cleaned →