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

---

# deleted index.php

 *  [udula](https://wordpress.org/support/users/udula/)
 * (@udula)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/)
 * I’m using cpanel and I accidentally deleted the root index.php file as far as
   I remember. I don’t have a backup and I’m so lost. I restored a new index.php
   file, but the new theme has switched to the default one. Is it something wrong
   with the .htaccess file in the root folder? Please I need to recover it soon.
 * .htaccess file says,
    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine
   On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   >
 * # END WordPress

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

 *  [TCBarrett](https://wordpress.org/support/users/tcbarrett/)
 * (@tcbarrett)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227938)
 * I have never used fantastico, but if you are familiar with FTP:
 * Double check that it really is missing.
    Note what version you are using (something
   like wp-includes/version.php) Download the archive: [http://wordpress.org/download/release-archive/](http://wordpress.org/download/release-archive/)
   Unzip the archive and upload any missing core files.
 *  Thread Starter [udula](https://wordpress.org/support/users/udula/)
 * (@udula)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227940)
 * I tried finding a solution using FTP and comparing a fresh copy of wordpress.
   Nothing really works. 🙁
 * $wp_version = ‘3.2.1’;
 * Things got quite worse, when I changed index.php file and assigned a different
   Db user and Db name just now.
 * I’m facing a shit-hit-the-fan situation.
 *  Thread Starter [udula](https://wordpress.org/support/users/udula/)
 * (@udula)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227942)
 * and now I’m faced with this error:
    Parse error: syntax error, unexpected T_STRING
   in /home/mysite/public_html/wp-config.php on line 3
 *  [TCBarrett](https://wordpress.org/support/users/tcbarrett/)
 * (@tcbarrett)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227944)
 * Leave the core files alone, you have edited the wp-config.php file incorrectly.
   Backup your wp-config.php file. Rebuild it with your original settings. If you
   change them, it either wont work, or you’ll be prompted to install WordPress 
   again.
 * [http://codex.wordpress.org/Editing_wp-config.php](http://codex.wordpress.org/Editing_wp-config.php)
 *  Thread Starter [udula](https://wordpress.org/support/users/udula/)
 * (@udula)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227947)
 * Yes, I get what you mean. I edited the file first and figured that it’s giving
   me an error, so I reverted back to my previous setting. But the error didn’t 
   change.
 * My point is let’s get back to root of the problem.
    “I’m using cpanel and I accidentally
   deleted the root index.php file as far as I remember. I don’t have a backup and
   I’m so lost. I restored a new index.php file, but the new theme has switched 
   to the default one. Is it something wrong with the .htaccess file in the root
   folder? Please I need to recover it soon.”
 * Is it only the index.php file I’ve deleted? Have I deleted any other root files
   as well?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2227956)
 * Try re-uploading all files & folders – **except** the wp-content folder – from
   a **fresh** download of your version of WordPress.
 *  Thread Starter [udula](https://wordpress.org/support/users/udula/)
 * (@udula)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2228085)
 * Thank you! I did as you asked. But prior to that I created a backup. I was able
   to recover the blog. Now all my posts and themes are missing. I updated it because
   it asked me to update my database. What shall I do now?

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

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

## Tags

 * [deleted files](https://wordpress.org/support/topic-tag/deleted-files/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [udula](https://wordpress.org/support/users/udula/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/deleted-indexphp-3/#post-2228085)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
