How To Get Rid of Malware

More than 431 sites are affected by malware, directing users to various ad networks.
This contamination affects PHP files, JS files, wp_posts tables, and site URLs ( wp_options ).

Need help? Let us clean your site.

New guide: contamination affects both database and web files, so I would recommend to:
a) Check other sites that share the same hosting account.
If malware infection is widespread, each site should be isolated, to prevent cross-site contamination.
b) Perform a site rebuild for each WordPress instance, manually adding plugins, theme and core files from official sources.

To fix a hacked website, follow these steps:

Step 1
1. Backup database and web files using a file manager tool, FTP client or ask your web host.
2. Disable MySQL remote access.

Step 2
Reset site URL
Restore site URL:
To restore site URLs, edit the wp-config.php file and add the following lines:

define( 'WP_HOME', '' );
define( 'WP_SITEURL', '' );
Step 3
Clean local files
If site rebuild still contains plugins or themes from a previous backup, all index.php and JS files may be corrupted as well.
Look for “$a=chr(“, “chr(104)”, “String.fromCharCode”, “trainresistor”, and “”.

Insert the following script inside the pack.php file and place it inside your root folder. This way you can pack all PHP and JS files and scan them locally.

Search and replace tools for malicious strings inside multiple files: dnGrep, grepWin, VisualGrep, PowerGREP.

Step 4
Database check
  • As a precaution measure, look for “trainresistor”, “String.fromCharCode”. This way you will know if other tables are infected as well.
    Injections usually target wp_posts and wp_options tables.
    The following SQL commands may be used to clear any malicious JS:
  • Search and replace database tool for malicious strings: Better Search Replace, Search Replace DB ver. 4.

  • Check users with administrator privileges.
Step 5
Major update
Perform a major update, making sure core files, theme, and plugins are up to date.
Disable and remove any abandoned or suspicious plugins.

Step 6
Blacklist status & Google cache
Site should be verified with Google search console. To refresh indexed pages, ask for a re-index.
This way, any infected cached pages listed on Google will be updated.

Step 7
Cross-site contamination
If you’re using a single shared hosting account for multiple websites, all index.php and JS files may be infected.
So make sure other sites hosted on the server are secured and isolated.

Try our Free site check.

If your Google Ads are suspended, we recommend our Platinum plan – service will include cleanup and Ads support:

Malicious URLs:

12/20/2021 update:

12/21/2021 update:

Malicious IPs:,,,
Malicious domains:,,,,,,,,,,,,,,,,,,,


Similar hack: