Skip to content

How to Recover a Hacked WordPress Website

Hacked WordPress – modern urban scene in Cape Town, South Africa
Photo: Photograph by Mike Peel (www.mikepeel.net)., CC BY-SA 4.0, via Wikimedia Commons

There’s a specific kind of panic that hits when you type in your own website and instead of your homepage you get a Google warning screen, a pile of spammy links about medications you’ve never sold, or your site redirecting to some completely unrelated page in another country. If that’s you right now, take a breath — this is fixable, and you’re not the first Kenyan business owner it’s happened to.

Here’s exactly what to do, in order.

Step 1: Confirm it’s actually hacked

Sometimes what looks like a hack is a plugin conflict or a broken update. Signs of an actual compromise include: unfamiliar admin users you didn’t create, strange pages appearing in your sitemap that you never wrote, your site being flagged by Google Safe Browsing, or unexpected redirects to gambling, pharmaceutical, or adult content sites. If you see any of these, treat it as a hack and move fast.

Advertisement

Step 2: Take the site offline temporarily

Put the site into maintenance mode or, if it’s actively redirecting visitors elsewhere or serving malware, take it fully offline while you work. This protects your visitors and stops search engines from indexing more compromised pages while you clean up.

Step 3: Change every password immediately

Not just your WordPress admin password — your hosting account password, your cPanel login, FTP credentials, and your database password too. Hackers often plant backdoors that let them back in even after you’ve cleaned the visible mess, so assume everything was seen and rotate all of it.

Step 4: Restore from a clean backup if you have one

This is the fastest and most reliable fix. If you’ve been taking regular backups — and if you haven’t, this is exactly why you should start today — restore to a version from before the compromise. Most Kenyan hosting providers, including us, keep automated backups you can roll back to from your hosting dashboard or by reaching out through our contact page.

Check the restored site carefully before bringing it back online — confirm there are no unfamiliar files, users, or plugins left over.

Step 5: If you don’t have a backup, clean manually

This is more involved but doable:

Advertisement
  1. Download a full copy of your site files and database first, so you have something to work from
  2. Compare your current core WordPress files against a fresh download from wordpress.org — any file that’s different or shouldn’t exist is suspect
  3. Check wp-content/plugins and wp-content/themes for anything you don’t recognize installing
  4. Look through your database, particularly the wp_users and wp_options tables, for admin accounts you didn’t create or unfamiliar entries
  5. Remove anything suspicious, then update WordPress core, every plugin, and your theme to the latest versions

If this feels beyond your comfort level, a security specialist or your hosting provider’s support team can usually clean a compromised WordPress install for a reasonable one-off fee — often cheaper and faster than trying to untangle it yourself over a weekend.

Step 6: Ask Google to review your site

If your site was flagged with a security warning, once it’s clean, submit a review request through Google Search Console. This usually clears the warning within a few days, though your rankings may take a little longer to fully recover.

Step 7: Lock it down so it doesn’t happen again

Once you’re back online, put real protections in place:

  • Enable two-factor authentication on your admin login
  • Install a reputable security plugin like Wordfence or Sucuri
  • Set up automated daily backups if you haven’t already
  • Keep WordPress core, themes, and plugins updated — most hacks exploit outdated software with known vulnerabilities
  • Remove any plugins or themes you’re not actively using
  • Use strong, unique passwords for every account tied to your site

Why this happens more than people realize

Most WordPress hacks in Kenya aren’t targeted attacks — they’re automated bots scanning millions of sites for outdated plugins with known security holes. That’s actually good news: it means basic hygiene (updates, strong passwords, backups) blocks the vast majority of attacks before they start.

If you’re not confident managing this yourself, our support team can help with cleanup and set you up on managed hosting with automatic backups and monitoring — reach out through our contact page and we’ll walk you through it.

Advertisement

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat now