Install the plugin “WordFence” and scan your site to find the infected plugin. Then delete the infected plugin entirely and reinstall it from the source if you are sure it has been fixed.
I also recommend deleting the folders wp-admin and wp-includes (after creating a backup) and then uploading them from scratch with the original wp core files that you can get here: https://wordpress.org/latest.zip.
Also, follow these steps to harden your website’s security:
Hardening WordPress
If your website is critical, I recommend that you hire a professional to have a deep technical inspection of your website to find out any other malware leftovers.
Cleaning up an infected website is a complex process because every file can contain malicious code and there is no guarantee reinstalling an infected plugin will delete the entire bad code.
Thanks a lot! It’s working )))) Still, there is file index.php in wp-content/uploads folder seems has malicious code inserted. Wordfence doesn’t offer to repair this one. Can I delete this file? I am not really how should I remove this malicious injection.
Thank you!
Hello @ambassador21
I’m glad to hear that it’s working.
(I am a team member of WP STAGING, from whom you received the first reply, and am writing to you from my personal WordPress account).
You can delete the entire file or, for added protection, keep the file but delete all the content and insert the following lines:
<php
// Silence is golden.
Make sure that the permissions for this file are 644 or less.