deleted index.php
-
I accidentally deleted my index.php file…what do I do to restore this??
-
Restore your backups. OK. Guess you don’t have any backups. Sorry but a big believer in regular backups.
If it is an original file then just pull it from an original package.
If it has been edited and you have to have the edited file then your only hope will be if your hosting company has a recent backup. Most do backups but don’t always tell their users though there may be a charge.Hi,
WordPress stores all the details in the database so there can not be any data lose..but you can restore it either from your available backup or from the theme where you have downloaded and copy the file over there..
Thanks,
Shane G.
I accidentally deleted my index.php file…what do I do to restore this??
Just replace the index.php via ftp client or your file manager. If the index.php you refer to is in your theme folder, then just restore it from the original theme or a backup. If you are referring to the index.php that is located in your WordPress installation directory, you can simply restore it from the WordPress download package or any backup that you have available.
Thought that was what I already said.
ANd Shane. You can in fact lose data. If you do not have a backup of the database. Databases can get corrupted, hacked or lost if the server crashs. If you have no backup then you would have no data.
And should also have a backup of the files. It makes restoring WP easier; and if you have files you are editing it is the only way to get back what you have edited.
Backups are directly related to what you can afford to lose. If you can not afford to lose it, then having no backup is idiotic.Thought that was what I already said.
A little insecure are we, webjunk? The OP just accidentally deleted an index file. No one mentioned server crashes or databases.
But, just for your edification, my reiteration of the painfully obvious was an indirect attempt to dismiss the unnecessary introduction of a non-issue (in this case, the mentioning of the “database”). Shane G has an occasionally annoying habit of jumping on posts(including a few of mine) simply to repeat what others have said before him. It was a nudge for him, not you. So, buck-up trooper. No-body wants to steal your thunder.
Hope ‘ya got it fixed!
🙂
Clayton. Don’t take everything (especially from me) all too seriously. Maybe I should have included a smiley in my reply 🙂
Now back to being serious for a minute, I actually took Shane’s mention of “stores all the details in the database so there can not be any data lose..” a very dangerous statement especially on this support forum.
Many people have an idea that because data is in a database they magically can not lose anything so its single digit % of whom actually backup their databases. Or their files. Now he may have meant that because it is a missing index.php that data is not affected. But if the file (index.php) has been edited than there are Changes that will be lost. But the statement to many uninitiated on here, may indicate backups are not needed.
See few mentiones on here of how important or what should be backed up but backups are as important as the site itself. Yes many postings are “how do I replace something I lost, deleted or corrupted”🙂 🙂 :p
hello, I also deleted my index.php.
I backup weekly, and I have “restored” the backup… but the index.php file is still missing.
Am I missing something?
which index.php? the one in your theme? or the main one? If it’s your theme’s index.php, just reupload it from your theme (either you have a backup, or you download it again from wherever you got it), if it’s the main index.php, just download WP again from this site, and grab the index.php
The topic ‘deleted index.php’ is closed to new replies.