Title: [Plugin: Duplicator] Skip wp-config.php overwrite
Last modified: August 20, 2016

---

# [Plugin: Duplicator] Skip wp-config.php overwrite

 *  Resolved [wp_hela](https://wordpress.org/support/users/wp_hela/)
 * (@wp_hela)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-duplicator-skip-wp-configphp-overwrite/)
 * Thanks to inTheGrid … an excellent job you did … and the plugin really works 
   😉
 * Though, one things pops up in my own setup.
 * I create locally and then deploy to production. Therefore I adjusted my wp-config.
   php to check whether it is running locally or on the production server
 * `if ($local){define('DB_NAME', 'local_db_name');}else{define('DB_NAME', 'server_db_name');}`
 * So when I restore a backup from the server installer asks me
 * 1) to either empty the complete root directory of my installation or at least
   delete wp-config.php … which I don’t like to do for obvious reasons 😉
 * 2) take db name and user data to log into my mySQL database AND also to overwrite
   my wp-config.php
 * So I end up with:
 * `if ($local){define('DB_NAME', 'local_db_name');}else{define('DB_NAME', 'local_db_name');}`
 * Is there somewhere an option in the installer process to skip overwriting wp-
   config.php?
 * regards
    Heinz
 * [http://wordpress.org/extend/plugins/duplicator/](http://wordpress.org/extend/plugins/duplicator/)

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

 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-duplicator-skip-wp-configphp-overwrite/#post-3081962)
 * Hey Heinz,
 * Thanks for the feedback… I see your issue. Right now you will just have to manually
   comment out the logic in the installer.template.php file to not write to the 
   wp-config file (just search for wp-config.php).
 * I currently have a pretty large list of todo items. I’ll put that on the list,
   but it may be a few version before it gets implemented…
 * Hope that helps!
 *  Thread Starter [wp_hela](https://wordpress.org/support/users/wp_hela/)
 * (@wp_hela)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-duplicator-skip-wp-configphp-overwrite/#post-3081969)
 * Thanks for your response … at least I knwo what to do
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-duplicator-skip-wp-configphp-overwrite/#post-3081972)
 * No Problem! Feel free to submit any code changes as I have been using various
   contributions from other developers…

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

The topic ‘[Plugin: Duplicator] Skip wp-config.php overwrite’ is closed to new replies.

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-duplicator-skip-wp-configphp-overwrite/#post-3081972)
 * Status: resolved