Title: deleted index.php
Last modified: August 19, 2016

---

# deleted index.php

 *  [howtoebookguy](https://wordpress.org/support/users/howtoebookguy/)
 * (@howtoebookguy)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/)
 * I accidentally deleted my index.php file…what do I do to restore this??

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [webjunk](https://wordpress.org/support/users/webjunk/)
 * (@webjunk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090292)
 * 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.
 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090302)
 * 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.
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090308)
 * > 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.
 *  [webjunk](https://wordpress.org/support/users/webjunk/)
 * (@webjunk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090323)
 * Thought that was what I already said.
 *  [webjunk](https://wordpress.org/support/users/webjunk/)
 * (@webjunk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090325)
 * 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.
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090361)
 * > 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.
 * [@howtoebookguy](https://wordpress.org/support/users/howtoebookguy/),
 * Hope ‘ya got it fixed!
 * 🙂
 *  [webjunk](https://wordpress.org/support/users/webjunk/)
 * (@webjunk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090376)
 * 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 **
 *  [jesseali](https://wordpress.org/support/users/jesseali/)
 * (@jesseali)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090582)
 * 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?
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090583)
 * 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

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘deleted index.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 6 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/deleted-indexphp-1/#post-1090583)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
