Title: Do you delete wp-config.php?
Last modified: August 19, 2016

---

# Do you delete wp-config.php?

 *  [Ddoofi](https://wordpress.org/support/users/ddoofi/)
 * (@ddoofi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/do-you-delete-wp-configphp/)
 * Hello,
 * I’m wondering, do you delete the wp-config.php file after installation is complete?
 * I ask because I didnt see anything mentioned about that in the installation instructions(
   and I assume it would be erased, since it holds the DB name, User ID and Password
   to the DB …. so, basically anyone can grab it)

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/do-you-delete-wp-configphp/#post-1220562)
 * > … do you delete the wp-config.php file after installation is complete?
 * No. If you do, WP will not work.
 * > so, basically anyone can grab it
 * Wrong. PHP executes on the web-server before anything gets sent to the web browser
   and wp-config.php sends nothing to the browser. You can’t get DB information 
   by trying to open the file. You just get a blank page.
 *  Thread Starter [Ddoofi](https://wordpress.org/support/users/ddoofi/)
 * (@ddoofi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/do-you-delete-wp-configphp/#post-1220568)
 * Okay, thanks for the help. I wanted to ask because I was testing WordPress out
   on a localhost server on my computer and I was able to pull the wp-config file
   through the browser and I just want to make sure the same thing wasnt possible
   when I uploaded to my site.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/do-you-delete-wp-configphp/#post-1220570)
 * > I was able to pull the wp-config file through the browser…
 * Even on a local server, this shouldn’t work. The PHP should execute and the browser
   should get nothing. Do you have a working wordpress on that local server?

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

The topic ‘Do you delete wp-config.php?’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 2 participants
 * Last reply from: [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/do-you-delete-wp-configphp/#post-1220570)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
