cursor
h a t t a n m e d a
Get a quote
  • Security

What a hacked WordPress site looks like, and how to clean it up

A hacked WordPress site usually looks the same as it did the day before. The homepage loads, and a stranger holds an administrator login. If your site has gone a year or more without updates, check it this week.

What we found on a site that looked fine

This month we cleaned up a small business WordPress site that had gone years without updates. WordPress itself and several plugins were years out of date, including an old slider plugin and an old page builder. The homepage still loaded normally, so nothing looked wrong.

Within a few days, an attacker had done four things:

  • Left a small PHP file in the admin folder that ran any code sent to it.
  • Added a line to an existing plugin file that did the same.
  • Installed a file manager plugin.
  • Created a new administrator account.

Each of the four is a separate way back in. Remove three and the fourth still works.

A cleanup that stops at the first bad file fails for that reason. Sucuri's guide to cleaning a hacked WordPress site reports the same from its own work. It finds several backdoors in a hacked site more often than one, and a site where a rogue admin user survives the cleanup gets reinfected quickly.

We could not confirm how the attacker got in. The server's access logs only went back a day.

Why you see nothing

An attacker who wants to keep using your server gains nothing by breaking your homepage. Patchstack's State of WordPress Security in 2026 report describes the most common malware of 2025 as built to hide.

That malware shows spam pages to search engine crawlers and redirects some human visitors to scam sites, while "security scanners and site owners often see clean content." According to the report, hosting companies often learn of a compromise only after rankings drop, customers complain about redirects, or a security service blacklists the site.

WordPress's own guide for hacked sites lists the signs that do surface. Google or Bing flags your site, your host disables it, visitors' antivirus software warns them, or you find users you never created.

A free remote scan such as Sucuri SiteCheck is worth running. Read a clean result with care. Sucuri's guide says a remote scan browses your public pages and can miss what lives on the server, backdoors included.

How a neglected site gets hacked

Old plugins are the usual door. Patchstack counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025, up 42% on 2024. It found 91% of them in plugins and 9% in themes.

WordPress core had six, all low priority. Those numbers count flaws found, not sites hacked, but they show you where the risk sits: in the add-ons.

Attackers move fast. For the most heavily exploited vulnerabilities of 2025, Patchstack measured a weighted median of five hours between public disclosure and the first attack. A site you update once a year sits exposed for most of that year.

Updating does not cover everything either. Patchstack found that 46% of vulnerabilities had no fix from the developer by the time they became public. An abandoned plugin stays vulnerable however often you click update, so delete what you can live without.

What WordPress recommends

The WordPress hardening guide runs long. The parts an owner controls are short:

  • Update. Stay on the latest version of WordPress and use its automatic updates. The guide warns that once a fix ships, the information needed to attack the old version is almost certainly public.
  • Remove what you do not use. The guide's wording: "if you are not using a specific plugin, delete it from the system." Deactivating a plugin leaves its files on the server.
  • Limit access. The guide tells you to reduce the entry points open to an attacker, use strong passwords and turn on two-step authentication. Sucuri goes further and recommends one admin user, with everyone else on the lowest role that lets them do their work.
  • Back up. Keep regular snapshots of your files and database in a trusted location. The guide's example: with weekly snapshots, a site hacked on May 1 and noticed on May 12 still has a clean copy to rebuild from.

The first hour after you find a hack

  1. Write down what you saw and when. WordPress makes this the first step. Your host or whoever cleans the site will ask for it.
  2. Back up the infected site as it is. Files and database. WordPress recommends a snapshot before you clean, so that you keep a copy to refer to if the cleanup goes wrong.
  3. Change every password. WordPress admin, hosting panel, FTP or SFTP, and the database. Then replace the secret keys in wp-config.php, which logs out anyone still signed in.
  4. Check the users. Look for administrators you did not create. Sucuri says to check FTP, SSH and database users as well.
  5. Look for recently changed files. Sucuri's guide shows how to list them from your hosting file manager or over SSH. Treat changes you cannot explain as suspects.
  6. Restore or clean. If you hold a backup from before the break-in, restore it. If not, WordPress says you can replace the wp-admin and wp-includes folders with fresh copies of the same version, then work through plugins and themes with more care.
  7. Update, then change the passwords again. WordPress tells you to do both once the site is clean.

On the site we cleaned, we moved the malicious files to a quarantine folder and removed the rogue account's administrator role. We checked every PHP file on the server for the same patterns.

Then we checked the other sites on that server for new administrator accounts and backdoor files. WordPress gives the same warning about shared hosting: a hack may have touched more than one site.

A hacked site can hurt your email too. WordPress notes that attackers use hacked sites to send spam, which gets the server's address blacklisted, and that server often sends your business mail. If your invoices began landing in spam around the same time, read our guide to email authentication once the site is clean.

When a rebuild beats a cleanup

A cleanup makes sense when you know roughly when the break-in happened and the software underneath still gets updates. We would rebuild in three cases:

  • You have no backup from before the break-in and no logs. You can remove what you find. You cannot show that you found all of it.
  • The site depends on a plugin or theme that no longer gets updates. A cleanup returns you to the same exposed software.
  • You planned to replace the site within a year. A careful cleanup of a site you are about to retire is poor value.

WordPress cautions that wiping everything and starting over is often impractical. A rebuild in the sense we mean keeps your pages, posts and images and replaces the code under them: a fresh WordPress, current plugins, and your content moved across and checked.

What to do this week

  1. Log in to WordPress and check the Dashboard for pending updates. Count them.
  2. Click Users and look at every account with the Administrator role. Remove or downgrade any you cannot put a name to.
  3. Open the Plugins screen. Delete the inactive ones and any you did not install. A file manager plugin nobody on your team asked for is a red flag.
  4. Ask your host how far back the access logs go, where your backups live, and how many days of them it keeps.
  5. Run a free remote scan, and remember that a clean result does not rule out a backdoor.
  6. Turn on automatic updates and add two-step login for every administrator. WordPress needs a plugin for the second one.

HattanMedia builds WordPress sites and looks after them once they are live, with updates, backups and monitoring. If you want someone to check yours, see our WordPress development page or contact us.

All articles

More from the blog

AI

AI chatbot on your website: when it pays off and when to skip it

A chatbot helps when your site already holds the answers and someone checks its work. What a tribunal and state laws say about wrong answers.

AI

AI website builder, template, freelancer or agency: how to choose

An AI builder is the right answer for a simple site this week. Here is where it stops, and what a freelancer or an agency adds.

Search

Google Business Profile checklist for New York businesses

What Google says affects local ranking, how to set up each part of your Business Profile, and the mistakes that get a profile suspended.