## Summary

Seeing thousands of Japanese characters, gibberish product listings, or unfamiliar URLs under `site:yourdomain.com` in Google Search—even though your homepage looks normal when you visit directly—is the hallmark of the **WordPress Japanese Keyword Hack**. Attackers use server-side cloaking in `.htaccess` or injected PHP so search crawlers index generated spam pages and affiliate links while site owners remain unaware. If you want the infection removed cleanly and the entry point closed without losing live WooCommerce orders, SazM provides an affordable, fixed-price [WordPress malware removal service](/wordpress-malware-removal) for **$99, delivered within 48 hours**, entirely in writing.

## Where the Infection Hides

Unlike simple theme defacements, the Japanese Keyword Hack leaves traces across four layers:

- **Web server routing (`.htaccess`, `index.php`, `wp-config.php`):** Rewrite rules or `require`/`include` statements that intercept requests with Googlebot `User-Agent` or search `Referer` headers and hand them to a hidden spam generator.
- **Modified core or plugin files (`wp-includes/`, `wp-admin/`, `wp-content/uploads/`):** PHP backdoors and obfuscated loaders disguised with benign names (such as `wp-blog-post.php`, `class-wp-cache.php`, or PHP files inside `wp-content/uploads/`).
- **Database injections (`wp_options`, `wp_posts`, `wp_users`):** Rogue administrator accounts, injected `siteurl`/`home` or cron hooks (`wp_cron`), and spam post/option payloads.
- **Google Search Console property hijack:** Attackers frequently upload an HTML verification file to the web root and add themselves as a verified owner in Search Console to submit spam XML sitemaps.

## Step-by-Step Cleanup Protocol

Back up the current files and database first so you have a forensic snapshot (`wp db export pre-cleanup.sql`), even though it is infected. Do not overwrite live production databases with old backups before checking what changed.

### 1. Test What Googlebot Sees

Compare what a normal browser gets against a Googlebot `User-Agent` and a Google `Referer` header:

```bash
curl -sL -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" "https://example.com/?s=test" | head -n 40
curl -sL -e "https://www.google.com/" "https://example.com/" | grep -iE "sitemap|noindex|charset|meta"
```

If cloaked HTML, unexpected redirects, or foreign-language titles appear only for Googlebot or Google referrers, cloaking malware is active.

### 2. Verify WordPress Core and Plugin Checksums

Use WP-CLI over SSH to compare installed core and WordPress.org plugin files against official checksums (skipping plugins/themes temporarily if a loader breaks WP-CLI):

```bash
wp core verify-checksums
wp plugin verify-checksums --all
```

Reinstall untouched core files only after inspecting any flagged extra files (`wp core download --skip-content --force` on staging or after confirming `.htaccess`/`wp-config.php` are safe).

### 3. Check `.htaccess`, `wp-content/uploads/`, and Admin Users

Look for unexpected PHP files in uploads, recently modified `.php` files, and rogue administrators:

```bash
find wp-content/uploads -type f -name "*.php"
find . -maxdepth 3 -name ".htaccess" -print
wp user list --role=administrator
wp cron event list
```

Inspect `.htaccess` and `index.php` manually—clean WordPress `index.php` should only define `WP_USE_THEMES` and require `wp-blog-header.php`. Delete any unauthorized administrator accounts (`wp user delete <id> --reassign=1` after checking ownership) and revoke unknown application passwords.

### 4. Close the Entry Point and Rotate All Secrets

Cleanup without closing the entry point results in reinfection within days:

- Update WordPress core, plugins, and themes, and delete abandoned or unmaintained plugins.
- Rotate all WordPress salts in `wp-config.php` (`wp config shuffle-salts`), database passwords, FTP/SFTP/SSH credentials, and hosting panel passwords.
- Disable the built-in plugin/theme editor in `wp-config.php`:

```php
define( 'DISALLOW_FILE_EDIT', true );
```

### 5. Clean Google Search Console Owners and Sitemaps

Open **Google Search Console → Settings → Users and permissions** and **Sitemaps**:

1. Remove any unknown verified owners and delete rogue HTML verification files (`google*.html`) from the web root.
2. Remove injected spam sitemaps and re-submit your clean sitemap.
3. Ensure removed spam URLs return HTTP `404` or `410` so Google drops them naturally as it re-crawls.

If the site keeps reinfecting, hidden cron tasks or PHP files outside the WordPress root are usually respawning the backdoor.

## Hand It Over: $99 Fixed, Within 48 Hours

Cleaning a cloaked Japanese Keyword Hack manually means auditing core, plugins, themes, `.htaccess`, `wp-options`, Search Console verification files, and the original vulnerable plugin so the site stays clean.

What you get for **$99**:

- **Fixed price agreed before work starts.** One hacked WordPress site, one flat fee, no hourly meter.
- **Delivered within 48 hours** of access, with live customer data and orders preserved.
- **100% async, in writing.** Send the domain, what Search Console or search results show, and temporary least-privilege SSH/hosting access. No calls, meetings, or project managers.
- **Written proof:** the exact infected files and entry point found, clean checksum verification, hardened configuration, and a rollback note.
- **Money-back guarantee** if the agreed root cause cannot be resolved.
- **Safe access only:** revocable SSH/SFTP or hosting account. Never paste passwords into public forms.

Behind it: 20+ years in production (since Oct 2006) and 100+ projects in the portfolio.

**[Book the $99 malware cleanup →](/checkout/emergency)** · [See WordPress malware removal](/wordpress-malware-removal) · [Keep plugins patched with WordPress Care ($49/mo)](/wordpress-care) · [See past projects](/projects)

## Frequently Asked Questions

### Why does my WordPress site look normal to me while Google shows Japanese spam pages?
The malware uses server-side cloaking—inspecting `User-Agent` or `Referer` headers in `.htaccess` or injected PHP—to serve generated spam pages only to search crawlers or search-referred visitors.

### Will deleting the indexed spam URLs in Google Search Console fix the hack?
No. Search Console URL removals only hide cached results temporarily. Until you remove the injected PHP files, database entries, rogue Search Console owners, and the vulnerable plugin that let the attacker in, Googlebot will re-crawl the spam pages.

### Should I restore a backup to remove the Japanese Keyword Hack?
Not blindly. Backups made after the initial intrusion still contain the backdoor, and restoring an older backup overwrites recent customer orders and form entries. Compare files against clean checksums first and close the entry point.

### How much does it cost to remove the Japanese Keyword Hack in WordPress?
SazM cleans one hacked WordPress site, closes the entry point, and verifies the site clean for a fixed $99 within 48 hours, with a money-back guarantee if the agreed root cause cannot be resolved. Typical agency hourly rates are higher and open-ended, while cheap automated scans often miss hidden backdoors and Search Console owner hijacks.

Site throwing a fatal error or white screen after an update? Read [WordPress crash recovery after a plugin update](/articles/wordpress-crash-recovery-after-plugin-update) or check [WordPress core RCE mitigation](/articles/cve-2026-119977-wordpress-core-rce).
