Support » Fixing WordPress » after hacked htaccess file automatically rewrite.

  • hello,
    my site hosted on digitalocean was hacked.
    I have tried to delete all unnecessary files. but I can not delete the index.php file and .htaccess file.
    The htaccess file always rewrites itself with the following code.
    [ Deleted ]
    can anyone please tell me how to get rid of this problem.

    • This topic was modified 3 months, 4 weeks ago by khojkori.
    • This topic was modified 3 months, 4 weeks ago by khojkori.
    • This topic was modified 2 weeks, 3 days ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    Please take a full backup of your site (including database).
    Now reinstall your WordPress and delete .htaccess file.
    Delete all the unwanted file if you see.
    I hope you will have fresh site then.

    Tips: How to reinstall WordPress
    Delete all of the file except wp-configue.php, wp-content folder
    Download WordPress and upload all the file except wp-content folder.

    I hope it will help you
    Thank you

    @khojkori This index.php and .htaccess file are in a sub-directory? It sounds like there is a malware dropper that is elsewhere and its job is to grab the correct spam terms (in your case, the specific pharmacy drug names) and so it will just regenerate the content. You need to remove the other malicious content that is causing this and I’d recommend starting with a security plugin like Sucuri.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.