Title: Staging to Production &#8211; Database replace
Last modified: November 9, 2020

---

# Staging to Production – Database replace

 *  Resolved [ofmarconi](https://wordpress.org/support/users/ofmarconi/)
 * (@ofmarconi)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/)
 * Hi!
 * I wanted to know how your plugin works in this scenario:
 * I will duplicate the site to make some changes (staging) after the updates, something
   that can take weeks, I need to return these changes to Production.
 * In that time, for sure sales will be made, and the database will be updated.
 * If I copy the PRODUCTION sales table and paste it into STAGING when I finish 
   making changes, will it duplicate previous sales?
 * Or recognize and will not duplicate a sale that is already in the installation.
 * Sorry for the English GT.

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

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/#post-13645929)
 * Hi [@ofmarconi](https://wordpress.org/support/users/ofmarconi/),
 * If you’re importing orders and worried about duplicating them, there are a couple
   of options:
    - Use an “Existing Items” import to create new orders and leave the “Update 
      existing orders with changed data in your file” option disabled.
    - Or, use a “New Items” import along with custom code that uses our API to stop
      duplicates from being created ([see example for products import](https://www.wpallimport.com/documentation/developers/code-snippets/#do-not-create-products-with-duplicate-sku))
 * If I misunderstood, please elaborate/rephrase and I’d be happy to advise further.
 *  Thread Starter [ofmarconi](https://wordpress.org/support/users/ofmarconi/)
 * (@ofmarconi)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/#post-13646704)
 * Hey! Many thanks for the reply!
    I think that would solve it.
 * My reasoning:
    1 – I would duplicate my site in PRODUCTION for a new installation(
   STAGING); 2 – I would make the changes I need; 3 – On the PRODUCTION website 
   I use WP ALL EXPORT to export ORDERS; 4 – At STAGING I use WP ALL IMPORT to receive
   the most recent ORDERS; 5 – In conclusion, I migrate the updated site to Production.
 * Does that make sense?
 * My store is a digital download store, importing Orders, would Woo generate download
   authorizations?
 * Thanks.
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/#post-13670356)
 * Hi [@ofmarconi](https://wordpress.org/support/users/ofmarconi/),
 * Yes, that makes sense if you’re only wanting to sync orders.
 * As for download permissions in the orders, there’s currently a bug related to
   that, but it should be fixed in the next release.
 *  Thread Starter [ofmarconi](https://wordpress.org/support/users/ofmarconi/)
 * (@ofmarconi)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/#post-13670525)
 * **Thx!!!**

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

The topic ‘Staging to Production – Database replace’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [ofmarconi](https://wordpress.org/support/users/ofmarconi/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/staging-to-production-database-replace/#post-13670525)
 * Status: resolved