How to Remove Malware from Your WordPress Site

WordPress hacking is a very common issue today. I think that out of every 10 wordprss bloggers, 6 will face the problem of either getting their blog hacked or malware infected. A lot of my visitor had questions regarding several stuff related to wordpress hack and Remove Malware from website. you must know that nothing is perfect and you can never stop hackers or spammers

Malware removal or  a hacked WordPress site cleaning is no easy task.

Whenever you detect malware on your website, take it down to prevent hackers from further abusing it. we need to put our website under maintenance.

1. Create a “website under maintenance” web page and name its 503.php

2. Put following PHP code at the very top of the page (before the <html> tag)

 

This code redirect all pages link on 503 page and for any bot its said try after 2 hour now site under maintenance.

3. you need to change all password related to your website Like wp admin, ftp,database,server password.

If our website is infected with a malware which redirects website to another website,

Usually malware redirects are setup through the following ways:

1. Infected in core WordPress files.
2. Infected in website’s index file.
3. Infected in .htaccess file.
4. Infected in theme’s files(usually found in header.php, footer.php, functions.php).

i would recommend to you first visit on all above files and remove unwanted and infected code that you seen on code.

Some more steps to remove files.

Step 1:  Change Your cPanel/FTP Password

Step 2:  Download the latest WordPress from wordpress website.

Step 3:  Extract wordpress zip Files

Step 4:  Remove The Malware Infected file Bacup all your wordpress files

you should see this type of files :
wp-admin
wp-content
wp-includes
index.php
license.txt
readme.html
wp-activate.php
wp-blog-header.php
wp-comments-post.php
wp-config.php
wp-config-sample.php
wp-cron.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php

Steps 5: Delete everything except wp-content or wp-config.php

Step 6: Re-upload fresh WordPress that you already downloaded and check the wp-content folder files and remove all infeceted code form your theme files.

Step7 : Re-upload all wp-content files after removing infected code and change the ap-admin password

Step 8: Remove Google Warning and now your website is malware free

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.

I, Dayanand Saini,the founder and chief editor of www.webtechsource.com,have been working as a software engineer from last 4+ years. It's my hobby to learn new things and implement on live environment.

2 Replies to “How to Remove Malware from Your WordPress Site”

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 1

%d bloggers like this: