Title: wp-config.php deleted accidentally
Last modified: December 29, 2017

---

# wp-config.php deleted accidentally

 *  [tipsntrick](https://wordpress.org/support/users/tipsntrick/)
 * (@tipsntrick)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wp-config-php-deleted-accidentally/)
 * I deleted wp-config.php file accidentally via filezilla ftp. what can i do now?
   please help its urgent

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

 *  [Balint Toth](https://wordpress.org/support/users/tothbalint/)
 * (@tothbalint)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wp-config-php-deleted-accidentally/#post-9819828)
 * If you have a backup (or maybe your hosting company does), you can recover from
   there… If you don’t have a backup, then you can download a fresh copy of WordPress
   via a zip file, extract it, and opent he wp-config file. You will need to manually
   write in there the database credentials and the website urls for your site, then
   upload it through FileZilla. If you have some security or caching plugins installed,
   then it is possible they won’t work, so you will need to deactivate and activate
   them.
 * Here are some articles that may help you:
    [https://codex.wordpress.org/Editing_wp-config.php](https://codex.wordpress.org/Editing_wp-config.php)
   [http://www.wpbeginner.com/beginners-guide/how-to-edit-wp-config-php-file-in-wordpress/](http://www.wpbeginner.com/beginners-guide/how-to-edit-wp-config-php-file-in-wordpress/)
    -  This reply was modified 8 years, 4 months ago by [Balint Toth](https://wordpress.org/support/users/tothbalint/).
 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/wp-config-php-deleted-accidentally/#post-9819882)
 * If I can give some specific steps to create a new wp-config.php file:
    – Login
   to your website hosting management panel (probably cPanel) – Use the database
   management tools to find the name of your database, add this to your config file.–
   Use the database management tool to identify your database user, add this to 
   your config file. – Change the password for this user, add this to your config
   file. – Examine the contents of your database, from the table names find your
   table prefix, add this to your config file.
 * That is all that your config file needs.

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

The topic ‘wp-config.php deleted accidentally’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/wp-config-php-deleted-accidentally/#post-9819882)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
