‘wordpress.php’ file in root directory
-
I am trying to understand the origin of a ‘wordpress.php’ file that exists in the root directory of one of the wp sites that I support. I know this isn’t part of the initial build, but it may have been created by a plugin (perhaps WP-Auto-Upgrade?)
Here is the content of the file:
<? system("gunzip ./wordpress.tar.gz"); system("tar xf ./wordpress.tar"); system("rm -f ./wordpress.tar"); $fp = fopen("./wp-config-sample.php", "r"); $filecontent = fread($fp, filesize("./wp-config-sample.php")); $new_content = eregi_replace("%%DBNAME%%", $_REQUEST["db"], $fileconten$ $new_content = eregi_replace("%%DBUSER%%", $_REQUEST["u"], $new_content$ $new_content = eregi_replace("%%DBPASS%%", $_REQUEST["p"], $new_content$ fclose($fp); $fp = fopen("./wp-config.php", "w"); fputs($fp, $new_content); fclose($fp); ?>It appears to simply take the data from wp-config-sample.php and place it into the wp-config.php file. Anyone know the story behind this?
The topic ‘‘wordpress.php’ file in root directory’ is closed to new replies.