I had the task of cleaning up a WordPress website that had been infected with malware.
One of the things I discovered was each file path having a .htaccess file, which was clearly a product of malware.
Manually deleting the files was a herculean task since every single folder and subfolders in every folder had the .htaccess file, from plugins to themes.
It was clear the solution was to delete them all automatically using FTP.
After logging into Filezilla with my FTP details, these were the steps I took:
- Press F3 to start the search
- Use Filename is equal to as criterion and enter the name of the file.
- Let the search finish.
- Use CTRL+A to mark all found files, then right click – Delete.
- Now, FileZilla will attempt to delete these files. Unless the attacker did protect them somehow, this should do.
Thankfully, it went smoothly and in a matter of minutes, I was able to fix what would’ve ordinarily cost me days.