Subfolder install – Root folder index.php gets overwritten occasionally
-
Hi all,
I have a site that was installed in a subfolder some time ago that on 2 occasions (months apart), the following error message was displayed in the browser when visiting the domain name.
There doesn’t seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.
The site had not been touched (apart from fixing this issue).
On both occassions that this has happened, it seems to have been caused by the root folder’s index.php file getting overwritten.
The index.php file should include the following edited code:
/** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
But each time the missing wp-config.php issue has occurred, it reverts back to:
/** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Manually changing this index.php file to include edited code again fixes the problem…but it seems to only be a temporary solution, as something keeps causing it to revert back every few months.
Questions
- Does anyone know what is causing this index.php file to revert back to its default?
- Is there a way I can permanently fix this issue?
Thanks for the help!
- The topic ‘Subfolder install – Root folder index.php gets overwritten occasionally’ is closed to new replies.