WordPress Security ServicesMalware Removal
Ransomware Recovery

WordPress Ransomware: What to Do If Your Site Is Held for Ransom

You open your website and instead of your homepage there's a message: your files are encrypted, pay in cryptocurrency, the clock is ticking. It's frightening, and that's the point. Before you do anything, take a breath. On WordPress sites, things are often less bad than the message claims, and there's a clear way to recover.

Sergey By Sergey, WordPress security specialist Updated 4 min read
In this guide
  1. What WordPress ransomware looks like
  2. Real or fake? Check before you panic
  3. Why you shouldn’t pay
  4. How to recover your WordPress site
  5. How to make ransomware harmless

What WordPress ransomware looks like

Ransomware on a website usually shows up in one of these ways:

  • Your homepage is replaced by a ransom note, often with a countdown timer and a cryptocurrency address.
  • Files on the server have been renamed with an odd extension and can’t be opened.
  • Your posts and pages have disappeared from the site, or are all replaced with the same message.
  • You get an email claiming your site and database have been encrypted or copied.

It’s much rarer on WordPress than on office computers, but it happens. And because it’s designed to cause panic, it pays to check the facts before reacting.

Real or fake? Check before you panic

Many ransom notes on WordPress sites are partly or completely fake. The attacker changes what visitors see, but your actual content is still there, unharmed. Others really do encrypt some files, but leave the database untouched. You need to know which situation you’re in.

Do these checks first. They don’t change anything:

  1. Open a few files. Using your host’s file manager or SFTP, download a couple of images from wp-content/uploads and try to open them. Readable images mean the uploads weren’t encrypted.
  2. Look at the database. Open phpMyAdmin from your hosting panel and browse the wp_posts table. Can you read your posts? Then your content is intact.
  3. Check the file names. Are core files like wp-config.php and index.php still there under their normal names?
  4. Check your backups. Log in to your backup service or hosting panel and see which backups exist and how old they are.

Why you shouldn’t pay

  • There’s no guarantee. You’re dealing with criminals who have already shown they’ll lie to you.
  • The attacker is still on your server. Paying doesn’t remove the backdoor they used to get in, so you can be targeted again.
  • It’s often unnecessary. As described above, the damage is frequently fake or partial, and websites are usually easier to rebuild than office computers.
  • You become a known payer, which makes you a more attractive target in future.

How to recover your WordPress site

1. Take the site offline and preserve evidence

Ask your host to put the site in maintenance mode, or block public access, so visitors don’t see the ransom note. Then make a full copy of the current state, encrypted files included. You may need it to work out what happened, and some files can occasionally be recovered later.

2. Change every password

Hosting account, SFTP/SSH, database, and every WordPress administrator. Do it from a computer you trust.

3. Restore from a clean backup

If you have off-site backups, restore one from before the attack into a clean environment. Check that it’s genuinely clean before going live. The attacker may have been on the server for days or weeks before showing the ransom note, so the most recent backup may already contain their backdoor.

4. No usable backup? Rebuild what you can

  • Ask your host for server-level snapshots. Many keep them even if you didn’t set up backups yourself.
  • Check the database. It’s often untouched. Your posts, pages and settings may be fully recoverable from it.
  • Reinstall WordPress, plugins and themes from their original sources rather than trusting any files on the server.
  • Recover images from a CDN, from your own computer, or from wherever the originals came from.

5. Find and close the entry point

This is the step people skip, and it’s the reason sites get hit twice. Work out how the attacker got in: an outdated plugin, a stolen password, a vulnerable theme, or another site on the same hosting account. Then fix it. My step-by-step malware removal guide covers how to look for backdoors and the entry point.

6. Think about data and notifications

If your site stores customer data, the attacker may have been able to read it. For online stores especially, talk to your payment provider and check whether you have legal duties to notify customers. This isn’t legal advice, but don’t ignore it.

What I usually find: when a WordPress site shows a ransom note, the database is very often intact, and the “encryption” affects only some files or none at all. The real problem is almost always the same as with any hack: an outdated plugin or a reused password let someone in. Once the content is recovered and that door is closed, the site is back to normal, and nobody has to pay anything.

How to make ransomware harmless

The best defense is a backup the attacker can’t touch:

  • Off-site backups stored outside your hosting account, for example in cloud storage, so someone on your server can’t delete or encrypt them.
  • Several weeks of history, so you can go back to before the attacker arrived.
  • A tested restore, so you know the backup actually works before you need it.

Add the basics from my WordPress malware protection checklist, such as updates, two-factor login and a firewall, and a ransom note becomes a bad afternoon rather than a disaster.

If your site is showing a ransom note right now and you’d like help working out what’s real and how to recover, contact me. I’ll start by checking what’s actually damaged, which is often much less than the message claims.

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

Should I pay the ransom to get my WordPress site back?

No. There's no guarantee you'll get anything back, payment marks you as someone who pays, and the attacker still has access to your server. On WordPress sites, the "encryption" is also often fake or partial. Spend the effort on recovery from backups and on closing the hole instead.

How do I know if my files are really encrypted?

Download a few files you know well, such as an image from your uploads folder, and try to open them. Look at the database in phpMyAdmin and see if your posts are still readable. If images open and posts are intact, your content wasn't encrypted, whatever the message says.

Can I recover my site without a backup?

Often, yes, at least partly. The database frequently survives untouched, WordPress core and most plugins and themes can be downloaded again, and your host may have server-level snapshots. Images can sometimes be recovered from a CDN or other copies. It's more work, but rarely hopeless.

Is my customer data stolen too?

It might be. If the attacker could change files on your server, they may also have been able to read the database. If you store customer data, especially for an online store, assume it may have been exposed and follow your legal and payment provider obligations.

How do I protect my site from ransomware?

The single best protection is off-site backups that the website itself can't delete, kept for several weeks. Add regular updates, two-factor login, and a firewall, and a ransom note becomes an annoyance rather than a disaster.

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 →