My WordPress Site Got Hacked with Gambling Spam: How to Spot It and Fix It

·

My WordPress Site Got Hacked with Gambling Spam: How to Spot It and Fix It

One morning I opened my hosting panel and the preview of a brand new WordPress site showed an online casino page in Indonesian: slot games, deposit buttons, a login form. I had not written a single post on that site yet. A second site on the same account showed the same kind of page. This is one of the most common WordPress hacks, and here is how to spot it and fix it properly.

Key takeaways

  • Check your sites in a private window: infections often hide from admins.
  • Change every password first, then scan.
  • A site with no content is faster to rebuild than to clean.
  • Forgotten test sites are the favourite target. Update or delete them.

What this hack is

Attackers break into WordPress sites through weak passwords, outdated plugins or pirated themes, then use them to promote gambling, pharmacy or other spam sites. Your domain’s reputation helps their pages rank in search engines. Sometimes they replace your homepage, sometimes they hide thousands of spam pages that only search engines see.

Signs your site has the gambling spam hack

  • Your hosting panel or Google shows casino, slot or betting pages you did not create.
  • A Google search for site:yourdomain.com shows strange pages in another language.
  • Visitors from Google are redirected, while you see the normal site when logged in.
  • Unknown admin users, plugins or files appear.
  • Google Search Console warns about hacked content or spam.
  • Your host emails you about malware or suspends the site.

Check in a private browser window. Many infections hide from logged-in administrators.

Step 1: Change every password

Hosting account, every WordPress admin, FTP or SFTP, and database. Turn on two-factor authentication for your hosting account. If one site on a hosting account is infected, assume the others on the same account may be too.

Step 2: Scan

Run your host’s malware scanner if it has one, and a security plugin scan. Note which files and sites are flagged. Also check the list of WordPress users and the plugins folder for anything you do not recognise.

Step 3: Rebuild or clean

If the site has no real content yet, do what I did: delete it and install WordPress fresh. It is faster and safer than cleaning. Do not restore an old backup, because the infection may be inside it.

If the site has content you need, export posts and media, reinstall WordPress core, reinstall plugins and themes from official sources only, remove any user or file you do not recognise, and then import your content. If revenue depends on the site, a professional clean-up service is worth the money.

Step 4: Clean up Google

In Google Search Console, check the Security Issues report, remove spam URLs with the Removals tool, and request a review once the site is clean. Spam pages can take a few weeks to drop out of search results.

Step 5: Lock it down

  • Keep WordPress, plugins and themes updated, and delete anything you do not use.
  • Never install pirated “nulled” themes or plugins. They are a common source of these infections.
  • Use strong unique passwords and two-factor login for admins.
  • Keep automatic off-site backups so you can recover quickly.
  • Check each site in a private window once a month.

Frequently asked questions

Will the hack hurt my Google rankings?

It can, especially if Google marks the site as hacked. Fast clean-up and a review request in Search Console limit the damage.

Can a security plugin prevent this?

It helps, but updates, strong passwords and removing unused sites matter more. No plugin protects a site nobody maintains.

The lesson

Hackers love forgotten sites: a test install, an old project, a domain you parked. Every WordPress site you own needs updates and an owner, even if nobody visits it. This journal is built on the clean reinstall of that exact site.

Get one useful email a week

Tools worth trying, tactics that made money, mistakes to avoid. Free and short.