Fix a hacked WordPress website showing gambling spam
WordPress hacked? The most common sign is gambling or casino spam. Google lists betting pages under your site's name, or warns that “This site may be hacked”, while the site looks normal to you. The spam is usually hidden from visitors and shown to Google, and it often comes back after you delete it. Below: how to check for it, how to fix a hacked website yourself, and how we can do it for you.
Updated 5 December 2026
Check your own site in 2 minutes
Three checks. If any one of them turns up spam or a redirect, the site is hacked.
Sound familiar?
- Casino or gambling results show up for your site in Google.
- Google shows "This site may be hacked" under your listing.
- It looks fine to you, but not to Google, or it only misbehaves on mobile.
- You cleaned the spam and it keeps coming back.
- Wordfence says the site is clean, but it still redirects visitors somewhere else.
1. Search Google for it
The most common version of this spam uses the words “slot gacor”. Search Google for your domain plus those words, using your real domain in place of yourdomain.com:
yourdomain.com slot gacor
For a stricter search that shows only pages on your site, try site:yourdomain.com gacor. Gambling titles or text, often written in Indonesian, on pages under your own address means spam pages are live. Results from other websites that only mention your domain don't count.
2. Look at the page source
Open your home page in Chrome. Press Ctrl+U on Windows, or Cmd+Option+U on a Mac, to see the page's code. Press Ctrl+F (Cmd+F on a Mac) and search for “gacor”. Try “casino” and “slot” too. A match means the spam is in your site's code, usually pushed off-screen where visitors can't see it.
3. Try it on your phone
Turn off wifi on your phone so it uses mobile data. Search Google for your business and tap your own result. If it takes you to a betting site or a site you didn't set up, the site is hacked, even if both checks above came out clean.
Google shows spam, but your page source is clean?
Some hacks serve the spam only when Google visits and give everyone else the normal page. Google's own help pages warn that many hacks are visible only to Google. It is the same hack, and it still needs cleaning.
Why it matters even if nobody sees it
Google can label your site as hacked
Search results can show "This site may be hacked" under your listing, and Search Console lists the problem under Security issues.
Your rankings can drop
Hacked content breaks Google's spam policies, and Google says sites that break them "may rank lower in results or not appear in results at all."
The spam comes back
These hacks often leave a backdoor: a hidden file or an extra admin account that lets the attacker back in. Delete the spam and leave the backdoor, and the spam returns.
Fix it yourself in 5 steps
If you or your developer are at home in the WordPress dashboard and your hosting panel, you can do this yourself. Take a full backup of files and database first.
- 1
Change every password
Change the passwords for every WordPress admin, your hosting account, FTP or SFTP, and the database. You set a new WordPress password for yourself under Users > Profile. When you change the database password, put the new one in
DB_PASSWORDinwp-config.phptoo, or the site stops loading. In the same file, replace the secret keys with new ones from WordPress's generator atapi.wordpress.org/secret-key/1.1/salt/; that makes every logged-in user sign in again, the attacker included. Then open Users > All Users and delete any admin you don't recognise. - 2
Update everything, and delete what you don't use
Update WordPress, every plugin and your theme from Dashboard > Updates. Delete plugins you don't use under Plugins > Installed Plugins, and themes you don't use under Appearance > Themes. A switched-off plugin still sits on the server, and an old one can still be broken into.
- 3
Find and remove the injected code
Search your theme's files for "gacor", starting with
header.php,footer.phpandfunctions.phpinwp-content/themes/(your theme's folder). Then checkwp-config.php,.htaccessand thewp-content/mu-plugins/folder: plugins there run automatically and can't be switched off from the dashboard. Last, search the database for "gacor", for example with phpMyAdmin in your hosting panel. Remove the code that adds the spam.This is the hard step. The spam code is often scrambled, so a plain search for "gacor" misses it, and the backdoor that put it there usually lives in a different file. Deleting the wrong line can take the whole site down. If you can't tell what a line of code does, stop here and get help.
- 4
Run a free Wordfence scan
Install the free Wordfence plugin and run its scan. It compares WordPress itself, and any plugins and themes that come from WordPress.org, with the official copies and reports anything that changed. A premium or custom-built theme has no official copy to compare with, so a clean scan doesn't clear it. The free version gets new malware signatures 30 days after paying users, so a very new infection can slip past it.
- 5
Ask Google to review the site
In Google Search Console, open the Security issues report. Once everything listed there is fixed, click Request Review. Google says the review can take from a few days to a few weeks. To hide spam pages from results sooner, open the Removals tool, choose the Temporary Removals tab and click New Request; it hides a URL for about six months. To make a removal permanent, Google says the URL can return a 404 (Not Found) or 410 (Gone) status.
Or we clean it for you
We remove the spam, find and close the backdoor, and handle the Google review.
$199 USD, fixed.
If the hack comes back within 14 days, we clean it again for free.
Have a developer or an agency? Send them this page. The five steps above are where any clean-up starts.
Get it cleanedTalk to us
Tell us your site's address and what you found.
Write to shyam@readybytes.in, or reply if we emailed you.
Common questions
Why does Google show casino or slot gacor pages for my website?
Most likely because your WordPress site has been hacked. Attackers add gambling links and pages to it and usually show them only to Google, so the site looks normal to you. Google's help pages warn that many hackers make changes that are visible only to Google.
How do I remove slot gacor spam from WordPress?
Change every password, update WordPress and delete unused plugins and themes, then remove the injected code from your theme files and database. Run a Wordfence scan and ask Google for a review in Search Console. The five steps above give the details. Step 3, tracking down the injected code, takes the most skill.
Why does the spam come back after I clean it?
Because the backdoor is still there. These hacks often leave a hidden file or an extra admin account that lets the attacker back in. If you delete the spam but not the backdoor, the spam returns, so change every password, delete admins you don't recognise and check wp-content/mu-plugins/.
How long does Google take to remove the "This site may be hacked" warning?
Google says its review can take from a few days to a few weeks. The review starts when you click Request Review in Search Console's Security issues report, after everything listed there is fixed. Step 5 above also shows how to hide spam pages from results sooner.
Is my site safe to visit if it has this spam?
Treat it as unsafe until it's cleaned. Spam on your site means someone else can change it, and some of these hacks send visitors to betting or other sites. Google can also show "This site may be hacked" under your listing in search results.
Who we are
Ready Bytes is a software company founded in 2009 by Shyam Verma. We started by building products for CMS websites. Our add-ons for Joomla, a CMS like WordPress, ran on 10,000+ websites within two years, and PayPlans, our billing and e-commerce suite, ran on 40,000+ websites.
We have delivered 200+ projects, and two of our products were bought for their IP.
More about Ready Bytes →