How to Remove Malware and Virus from WordPress Website: 7 Easy Steps
How to remove Malware or Spyware from WordPress website in 7 easy steps
With the millions of plug-ins and themes available, there are hundreds of ways to get hacked. Most often, it is a cracked software, but it has been infected with a malware or a virus.
We will see with you the techniques to get rid of this very unfortunate problem.
Did you notice a drop in your traffic on your website and wonder why?
There are thousands of hacked websites around the world every day. Your site is no exception. Many are hacked or injected viruses such as malware, trojans, or others. It is important to secure your website, but sometimes it is not always easy.
When you use your website and an advertisement or redirection is unknown, it means that your website has probably been infected. Do not panic!
We will show you how to clean your website of all these viruses and malware, to finally protect your website in the best way.
What is the best tool to analyze my website?
There are hundreds of websites or software to see if your website is infected. The fastest is probably Sucuri.net. Very often he helped me to discover small spyware on my websites. In just 30 seconds, it lets you know if you have been infected with adware or trojan.
Another website to scan your website for free is PCRisk. It is a bit slower, but lets you look deeper into your web files to discover spyware.
The most common type of Malware infection
Here’s the most common infection that Wordfence can fix without problems:
- Black hat SEO Redirection,
- spam seo injected13 suspicious,
- Many others too
What to do if you have been hacked?
No problem, you have complete control over your server so you can clean everything up without much difficulty.
Make a full backup of your WordPress website and database Mysql.
Start by removing plug-ins and themes that you do not use. Hackers always find a loophole, old plug-ins are often an open door for them. Subsequently, update all your remaining plug-ins and themes of your website.
Install the best plug-in for WordPress against spyware and malware, WordFence. This plug-in is offered as a free and paid version. The free version is comprehensive enough to solve your problem. You can install this plug-in directly on your WordPress administrator interface, in the “plugins” tab and the “add a new” submenu.
The software will ask you to confirm your email address to warn you of any breach or problem that your website may have subsequently. The second thing you need to do is secure your website with the Wordfence firewall.
Use the Firewall tab, an option should appear at the top of the page. Make sure you download/backup your .htaccess file before making the changes, it will have a button for that in the new wordfence page. Then, click “Continue”, your firewall will automatically go into “learning” mode for a week.
The learning mode will observe everything that happens on your website before permanently blocking the hackers. All websites work differently so this step is crucial.
You will be able to begin the analysis of your website. Go to the Scan tab of Wordfence in the Options Bar on the left. You should see a button “Start Scan”.
The software will start up, it may take some time.
A result list should display at the bottom of the page. Before you start editing or deleting files, you should look at them one by one. Very often the Wordfence software will display a description of the files at risk.
The quickest way to fix everything is to click on “Repair all repairable files” and then check the list of all corrupted files one by one. If you have not made any changes to the code on these pages, it is very likely that they are all corrupted files.
If you have an update on your website, Wordfence will notify you on the scan result. It will also notify you by email if you need to fix a problem on your website afterwards.
If you have w3 cache software or other software to generate a cache file for your website, you should clean your cache.
Repeat a test on the site of Sucuri and / or Pcrisk. Observe if your website is well cleaned. I strongly advise you to keep Wordfence permanently on your website afterwards.
Hackers are always changing their techniques to hack websites. Even the biggest are sometimes hacked, you are not alone. If you have any problems, you can purchase the professional service or send us a message through our “Contact Us” page.
Hello everyone, I am the main writer for SIND and Fortunate Web. I’ve been writing articles for more than 10 years and I like sharing my knowledge. I’m currently writing for many websites and newspaper. Most of our sources come from official ones and government research. You can contact me on our forum or by email at: email@example.com.