MARCH 14, 2018 7 MINS READ
Recently you might have read that nearly 300,000 websites been infected by a malware via a famous recaptcha plugin. Even we have mentioned about it in our WordPress December monthly roundup. WordPress security is not a single day task that once you did you can lay back and rest; it is a chore for a webmaster. Adding a security plugin to your monthly website maintenance plugin list is a must.
Ok, after all our precautionary measures we are affected by the malware. How to remove malware from WordPress? That’s what we are going to see in this post. These 10 easy steps will help you remove malware from WordPress. Before getting detail into the process, these are the steps we are going to use.
[tables_content title=”Step To Remove Malware From WordPress”][table_content link_type=”custom-link” title=”Step 1 – Scan Your Site” link=”#scan”][table_content link_type=”custom-link” title=”Step 2 – Backup Your Website” link=”#backup”][table_content link_type=”custom-link” title=”Step 3 – Examine the Backup Files” link=”#examine”][table_content link_type=”custom-link” title=”Step 4 – Format WordPress Folder” link=”#format”][table_content link_type=”custom-link” title=”Step 5 – Reinstall WordPress” link=”#reinstall”][table_content link_type=”custom-link” title=”Step 6 – Change Password” link=”#password”][table_content link_type=”custom-link” title=”Step 7 – Reinstall Plugins and Themes” link=”#reinstall”][table_content link_type=”custom-link” title=”Step 8 – Restore Your Backup” link=”#restore”][table_content link_type=”custom-link” title=”Step 9 – Scan Once Again” link=”#once”][table_content link_type=”custom-link” title=”Step 10 – Remove Google Warning” link=”#warning”][/tables_content]
Scan Your Site
Scanning your site is one of the best ways to find out whether your site’s security is been compromised or not. There are different types of hacks some are minor while some are brutal. For example, the backdoor attack that recaptcha plugin did is a brutal attack. This method of hacking will never let you know that your site is hacked until you get this message from Google.
Most common symptoms you see on a hacked sites is the malicious redirects. The Pharmaceutical Hacks are even worse, they spoil your brand. It shows advertisements to malicious sites, you won’t remember of pasting such codes on your site. This ads slowly eat up your sites search result and the excerpts when your site link is shared.
If you are not interested in plugins and looking for an easy online check up then you can use any one of the sites mentioned below.
[experts_box experts_title=”One Click Solution:”]WordPress Maintenance Plan Starts From $29/month. Select the best plan for you[/experts_box]
Backup Your Website
Being a WordPress maintenance service provider we always recommend our customer to have a scheduled backup of their site. The reason is the loss of data will be minimalized and you can easily restore your site to the previous checkpoint right before the hacking. If your backup is very outdated, then backup your current website. At Least you can use the files that are not infected. The best backup plugins we recommend are
[pro_tip title=”Pro Tip:”]Always try to make a full site backup for at least once a month or two months once. It will come in handy in tough situations like this.[/pro_tip]
Examine The Backup Files
Once you find which version of your site backup is free from malware, choose the file and examine the file to know what are the details you will be missing. Make a note of it and if you have the other source file of the missing data search for it and keep it ready. If you don’t have any other copy of the missing file then you have to work on it again.
Nowadays most of the best hosting service providers give you a scheduled backup option. Reach your hosting provider’s support and ask for a help. If the level of malware attack is minor they itself will fix it, if not ask them for a copy of a malware-free version. From there you have to manually take on the job of reverting your site.
Format WordPress Folder
Now we have to make your WordPress site clean slate. For that login to your cPanel and go to the location where you have installed WordPress. Now you have to completely delete all the WordPress files in your installation location. Mostly the WordPress files will be in the public_html folder if you have used any other location choose the particular location and delete the files.
All famous WordPress hosting providers now give one-click WordPress install option. We made a separate detailed post on how to start a WordPress websiteplease take a look at it to know the step by step process of one-click installation. Here in this post, I will give an overview of installing WordPress in the Bluehost.
First login to your hosting account and select the WordPress tools tab, you will get a window as shown in the image below.
Fill admin name, password and all other required details. Make yourself clear with the provided details and click the “Install WordPress” button.
After Successful install, you will get the following screen with a message. In that click the “Refresh” button to finish the installation.
In the one-click installation process, you will be given an option to give a password. For better security, it is advisable to give a new password that you haven’t used so far on your site. Even if you missed to change the password at the beginning, still you can change the password easily. After you hit the refresh button you will get a screen like shown below. In that click reset password and give a new password.
Reinstall Themes and Plugins
Now if you go to your site, you can see that your site running on a default twenty-seventeen theme. You can either choose to do a fresh new install of your theme and plugin or else you can use your backup to restore your site. This step completely depends on the type of backup you select. If you have done a complete backup, then you can go for the backup recovery method.
Restore Your Backup
The most recommended way is to restore the site from your backup. Even if you have customized by the theme, these backup files will help you to retain your theme customizations. Install the recovery plugin you used
We made a detailed post on how to recover a WordPress site from the backup. Please take a look at it know more. Again the method we recommend is using plugin method to backup and restore. Remember, to recover the site from backup use the same plugin which you used to backup your site.
Scan Once Again
To make sure that your site is completely free from the malware to make a full site checkup once again. You can use the same plugins and the online tools which I have mentioned above.
Remove Google Warning
After making sure your site is free of malicious software you can submit your site for Google review to remove the warning message. For that login to your Google Webmaster account, select your site >> Health>>Malware>>Request a review.