I have some websites build with WordPress. My sites are affected by Malware programs and Hacked by someone frequently. Finally got a solution to stop this issue.

I create this post for share my tips because i have found lots of sites got affected by the same issue daily.

Do this for your WordPress site to clean your Malware infected and Hacked wordpress sites. It will also helpful to secure your websites from attacks.


1 Answer 1


If your WordPress website got hacked, hacker will use your site to attack other sites and sending emails.

Most of the WordPress sites got affected by the same issue because of using Nulled & Outdated Themes and Plugins.

Don't worry about this issue, because we can easily wipe out the malware infected files from your website by follow these simple steps.

1.Replace The WordPress Files

  1. Login to your Filemanager and remove all the files & folders expect WP-CONTENT & WP_CONFIG.PHP
  2. Upload & Extract the fresh WordPress downloaded from https://wordpress.org/download/.
  3. Extracted fills will be stored inside the WordPress directory. Move everything into your domain's root directory.

2.Replace The Themes & Plugins Files

  1. Note the name of all Plugins & Themes and Delete that immediately.
  2. Download the Plugins & Themes from the official publisher and upload it again.
  3. Remove the Plugins & Themes Immediately which are not get updated
    more than 6 months. Find the alternative solution for that outdated items.

3.Search For The .PHP & .ICO Files Inside UPLOADS Folder

  1. Find & remove the .PHP and .ICO files from the UPLOADS folder using the search option available in Filemanager.

4.Find and Remove the Unauthorized Users

  1. Find & remove all the unauthorized users from your WordPress site.

Your site is completely clean. Once you done these process.

If you update everything in your WordPress properly, your site won't get affected again.

  • I would add: change all credentials (hosting, FTP, databases, Wordpress); look inside the wp-posts table for records with non-content in the record; look at htaccess for inserted code; look for hidden files (.ico, which often contain inserted code), modified or extra index.php; remove install.php; disable xmlrpc. Then repeat every three days. Look at your site's search results (goodle with 'site:example.com'). Look for files that have the 'execute' permission. Nov 24, 2019 at 23:20
  • Hello Rick Hellewell, Updating Passwords won't protect the affected site. You must clean the malware injected files completely to solve the issue. 1.Delete all Folders & Files except WP-CONFIG.PHP & WP-CONTENT. 2.After complete this process, delete all Theme Folders & Plugin Folders. 3.Replace the deleted WordPress, Themes and Plugins files with the files downloaded from official sources. 4.Find and Remove the .PHP & .ICO files inside the UPLOADS folder 5.Remove The Additional Users from your WordPress
    – Sathya
    Nov 26, 2019 at 2:39
  • I disagree about not updating passwords on everything, not just WP. They should be changed in case they were compromised in any way. I agree with your other recommendations. But I think my additional processes are important. Nov 26, 2019 at 5:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.