Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
WordPress Technical Guide

WordPress Malware, Casino Redirect, and Virus Removal

WordPress may be running malicious code conditionally if it is being redirected from Google, a mobile device, or a casino/advertisement site at intervals. Safe cleaning; requires inspecting the site in isolation, evidence and backup, core checksum, plugin/theme comparison, database, user, and cron persistence.

Malware RedirectCasino SpamWP-CLI ChecksumsCron PersistenceBackdoor
root@server:~SSH
Unexpected redirect to casino domain
wp-content/uploads/2026/07/cache.php
base64_decode(gzinflate(...))
Unknown administrator account
WordPress LayerKernel, theme and plugin behavior.
PHP layerVersion, extension, limit, and fatal error
Server layerWeb service, database, disk, and logs
Secure MethodBackup, log, isolate, and verify
01
Technical description

Why does WordPress redirect to another site and how does malware become persistent?

The attacker may appear as a lone configuration file, but can also leave a backdoor, cron, fake plugin, administrator account, or database record to re-infect.

Conditional malware can run based on Google referer, mobile user-agent, cookie, or IP. Administrators may not see issues on the dashboard while visitors are redirected; different client and curl user-agent tests are required.

PHP files in uploads directory, unknown mu-plugin, wp-config/index.php injection, and theme functions.php modifications are common persistence points. However, every base64 encoded file is not malicious; content context should be examined.

WP-CLI core verify-checksums finds core changes but does not clean wp-content. Plugin/theme files should be compared with reliable original packages.

After cleaning, all passwords, WordPress salts, hosting/SSH/FTP/database user IDs should be updated; the current but outdated entry point or stolen password should be corrected.

Deleting all files without live evidence gathering may hide attack source and persistence. Take isolated backup and file timeline first.

02
Log messages and their meanings

WordPress malware, redirect, and integrity indicators

Search for the phrase you see in the email, browser, or SSH log. Each card includes meaning, probable cause, and safe initial action.

8 registration
01kritik

Redirect to another site or casino domain name

Meaning: Visitor request is being redirected by a malicious rule or code.

Possible cause: htaccess, PHP, JS, DB or CDN injection.

Reproduce redirects with different user-agent/referrer.
02kritik

Redirect upon arrival from Google

Meaning: Malware is running with a referer condition.

Possible cause: SEO spam/backdoor conditional code.

Perform a curl test with the referer header from Google.
03kritik

PHP file in uploads directory.

Meaning: Executable backdoor may exist in the media directory.

Possible cause: File upload gap or seized account.

Inspect the file with hash/time/ownership and quarantine it if necessary.
04kritik

Unknown admin account

Meaning: Aggressive permanent panel access has been created.

Possible cause: Weak password or backdoor.

Examine your account, creation time, and sessions.
05warning

Japanese/casino pages in Google results

Meaning: Spam URLs are indexed or cloaking has been applied.

Possible cause: DB content injection or dynamic spam generation.

Compare Search Console and sitemap/URL list.
06kritik

Core checksum does not match

Meaning: WordPress core file has been modified or is missing.

Possible cause: Malware or half update.

Compare the changed file with a clean version.
07kritik

Unknown cron job

Meaning: Malicious code may be rewritten periodically.

Possible cause: WordPress cron or system cron persistence.

Save the hook and command and find its source.
08warning

base64_decode / gzinflate / eval

Meaning: Code may be hidden but is not conclusive malware evidence.

Possible cause: Obfuscation or legitimate package.

Verify file source, hash, and behavior

No records matching this expression were found.

03
Secure first review

SSH diagnostic commands and what output to look for?

Commands are for root access. Collect only status and logs first; Do not change the permanent setting without seeing the reason.

Kernel checksum
wp core verify-checksums --include-root

Displays unexpected changes in WordPress core and root files.

User list
wp user list --fields=ID,user_login,user_email,roles,user_registered

Detects unknown admin accounts.

WordPress cron
wp cron event list --fields=hook,next_run_gmt,recurrence

Lists suspicious or unknown scheduled tasks.

Uploads PHP scan
find wp-content/uploads -type f -iname '*.php' -o -iname '*.phtml'

Finds executable files in the media directory.

Suspicious code search
grep -RInE 'base64_decode|gzinflate|eval\(|shell_exec|passthru|assert\(' wp-content --include='*.php' | head -n 100

Audit candidate codes list; not used for automatic deletion.

File time schedule.
find . -type f -mtime -7 -printf '%TY-%Tm-%Td %TH:%TM %u:%g %p\n' | sort

Displays files changed in the last seven days in chronological order.

Plugin integrity
wp plugin verify-checksums --all

Checks the checksum status of WordPress.org plugins.

04
By hosting environment

Controls to be applied on cPanel, Plesk and panelless server

The root cause of the WordPress error is the same, but log paths, PHP settings screens and service management vary depending on the hosting infrastructure used.

cPanel / WHM

File Manager, Imunify/virus scan, Cron Jobs, and Raw Access are used together in cPanel.

  • Temporarily isolate your account and take a full backup.
  • Examine the PHP and last modified files in the uploads using the File Manager.
  • Check Cron Jobs, FTP accounts, and unknown admins.
cd /home/KULLANICI/public_html && wp core verify-checksums --include-root

Plesk Obsidian

Plesk WP Toolkit Security, ImunifyAV, and Scheduled Tasks support the cleaning process.

  • Save WP Toolkit checksum and security scan results.
  • Check suspicious system tasks with Scheduled Tasks.
  • Investigate the first exploit request in the domain logs.
cd /var/www/vhosts/ALANADI/httpdocs && wp core verify-checksums --include-root

Panel-less Linux Server

On a panel-less server, vhost isolation, file timestamps, and service logs are directly reviewed.

  • Lock the site externally and take a forensic copy.
  • List files modified by the web user.
  • System check cron, SSH keys and web server access logs.
find /var/www/html -type f -mtime -7 -ls | head -n 100
05
Safe solution order

WordPress malicious software and redirect issues safe cleaning steps

Isolate the site, obtain evidence/backups, define the scope of infection, compare files with clean sources, and close all persistence points.

1

Isolate the site under controlled conditions

Stop visitors from spreading malware; do not delete logs and files.

2

Full file, database and log copy is obtained

Save a backup for review and rollback in a separate secure area before cleaning.

wp db export olay-oncesi.sql
3

Verify kernel, plugin and theme integrity.

Classify changed files with checksum and clean package comparison.

wp core verify-checksums --include-root
4

Examine the persistence points

Uploads PHP, mu-plugins, cron, admin users, wp-config and database options.

wp cron event list
5

Reclone from a trusted source.

Replace suspicious components with a clean official package only; do not use nulled themes/plugins.

6

Reset all identities and close the login window.

WordPress, hosting, FTP, SSH, DB, SMTP passwords and salts must be renewed.

wp config shuffle-salts
06
Distinction by symptom

Special scenarios and decision trees

Only mobile visitor is being redirected

Mobile user-agent conditional malware or ad script is examined.

curl -A 'Mozilla/5.0 (Linux; Android 13)' -sSIL https://example.com/
Visitor from Google

A referer-based cloaking test is performed.

curl -e 'https://www.google.com/' -sSIL https://example.com/
It's getting dirty again after cleaning.

Backdoor, cron, fake admin, and compromised FTP/SSH account remain.

wp cron event list
Spam Pages Are Showing Up on Google

Indexed URLs, sitemap, DB, and Search Console security report are reviewed.

Only some PHP files are changing

Investigate web user, cron, and exploit endpoint access logs.

find . -type f -mmin -60 -ls

Absolutely don't

  • Do not delete suspicious files en masse without inspecting them.
  • Do not consider the website secure based solely on an antivirus ‘clean’ result.
  • Do not reinstall the nulled theme or plugin.
  • Do not change all passwords to the same old password variation.
  • Don't restore from a backup containing malware without verifying it first.
  • Do not mistake the removal tool in Search Console for a root cause solution.

Post-solution verification

  • No redirect in different user-agent and referer tests.
  • Core and trusted plugin checksums are clean.
  • No unexpected PHP file in uploads.
  • Unknown admin, no cron and SSH access.
  • Reset all identity information and salts.
  • Search Console security and index reports are being monitored.
07
Official technical resources

WordPress and WP-CLI official documentation

08
Internal SEO content set

Related WordPress error solutions

09
Frequently asked questions

WordPress Hack and Redirect Curiosities about

Why does WordPress redirect to another site?

Malicious .htaccess, PHP/JS code, database injection, plugin or CDN rule redirection can be created.

Is redirection possible only on mobile?

Yes; Malware user-agent control can only work with mobile visitors.

Is the site secure if the checksum is clean?

No. Checksum core verifies; wp-content, database, user, and cron should also be examined.

Is PHP normal in uploads?

Generally, PHP is not expected in the media directory; the file should be carefully examined.

Is every file that has base64_decode malicious?

No. It is not definitive proof on its own; the source and behavior of the file should be verified.

What passwords should be changed after cleaning?

WordPress users, hosting panel, FTP/SFTP, SSH, database, SMTP, and API keys.

When are Google spam results cleaned up?

After removing the root cause and returning correct 404/410 or clean content URLs, Google will re-crawl and fix.

EKA SOFTWARE AND INFORMATION SYSTEMS

Let's fix the error on your server permanently

By analyzing cPanel, WHM, CloudLinux, LiteSpeed, MariaDB, Exim and security layers together, we fix the root cause of the failure instead of just removing the service.

Get Server Support WhatsApp
Top