The ‘rogueads.unwanted_ads’ is a common WordPress malware. This malware is the result of several malicious injections that result in displaying ads (or opening pop-ups) without the consent of the site owner. These injections can use legitimate advertising network-scripts.
If you are using a cache plugin on your WordPress site, it is important that you clear the cache after removing the malware.Here is a complete guide on how to remove ‘rogueads.unwanted_ads’ from WordPress.
Step 1. Locate post.php File
Go to your WordPress installation directory. Open ‘wp-includes’ folder and locate post.php file. Right click on post.php file then click edit. Then remove the following code :
<?php if (file_exists(dirname(__File__) , '/wp-vcd.php')) include_once(dirname (__File__) , '/wp-vcd.php'); ?>
Locate this code and delete the exact line(as shown above). Now save post.php file. You can find this code usually on the top of post.php file.
Step 2. Delete ‘wp-feed.php & wp-temp.php
Inside ‘wp-includes’ folder you have to delete two .php file i.e. wp-feed.php and wp-temp.php. You can find the malicious code inside wp-temp.php file. Now, all you have to do is : delete wp-feed.php and wp-teme.php from wp-includes folder.
Step 3. Locate Function.php inside theme folder
Now, go back to WordPress installation directory. Then go to ‘wp-content’ > ‘theme’ folder. Here you will see your installed themes. Go inside your active-theme and locate function.php file. Now all you have to do is remove everything before this code. Code can be slightly different depending upon your theme. You will find this code on the bottom of the function.php file.
<?php
if ( !defined ('ABSPATH') ) {die(); ) }
global avia$ config;
If you are using any cache plugins then simply clear the cache. Now ‘rogueads.unwanted_ads’ will be removed completely from your WordPress sites.
[youtube v=”LWnh7Wcx1B4″]
Bijay Pokharel
Related posts
Recent Posts
Subscribe
Cybersecurity Newsletter
You have Successfully Subscribed!
Sign up for cybersecurity newsletter and get latest news updates delivered straight to your inbox. You are also consenting to our Privacy Policy and Terms of Use.