• 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 5 years, 7 months ago by khojkori.
    • This topic was modified 5 years, 7 months ago by khojkori.
    • This topic was modified 5 years, 4 months 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)
  • The topic ‘after hacked htaccess file automatically rewrite.’ is closed to new replies.