QUICK FIX: Incase your website have been infected with the htaccess malware

You got infected by the malware that created htaccess to all your subfolders?

Here is a quick php script to remove all of them.

1. Create a php file
2. Copy the script below
3. Upload the file to your root folder
4. Open it in your browser.


$dir = new RecursiveDirectoryIterator(getcwd());
$files = new RecursiveIteratorIterator($dir);

foreach($files as $file){
$name_of_file = $file->getFileName();
$path_of_file = $file->getPath().”/”.$file->getFileName();
//need to concatenate “/” otherwise it shows all attached (path and file name)
if ($name_of_file == “.htaccess”) {
//echo $path_of_file . “<br />”;


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer