Title: Staging push taking staging code with it
Last modified: September 10, 2021

---

# Staging push taking staging code with it

 *  Resolved [macde](https://wordpress.org/support/users/macde/)
 * (@macde)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/staging-push-taking-staging-code-with-it/)
 * When I push my staging site to live, its pushing the code in the WP-Config with
   it that tells Jetpack that its a staging site, which means my live site keeps
   breaking and is also in staging mode. How do I stop it pushing that code when
   I do staging push to production/live.
    Cloudways just say to re-edit the live
   site wp-config every time – but then have to reconnect Jetpack and try to find
   the stats. Surely there is a way to do this otherwise what’s the point of the
   code? ETA, now lost all the site stats 🙁
    -  This topic was modified 4 years, 9 months ago by [macde](https://wordpress.org/support/users/macde/).
    -  This topic was modified 4 years, 9 months ago by [macde](https://wordpress.org/support/users/macde/).

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

 *  [MadHatter (a11n)](https://wordpress.org/support/users/madhattersez/)
 * (@madhattersez)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/staging-push-taking-staging-code-with-it/#post-14859735)
 * Hello, there.
 * Re-editing the file every time is definitely not ideal!
 * In this case, it’s the method in which items are being pushed to your live environment,
   as the wp-config.php should not be overwriting the production site every single
   push. Do you or Cloudways have an option somewhere during the process to exclude
   the wp-config.php from getting copied? That should fix this issue.
 * As for your stats, we can merge your stats from your staging site to the live
   version. Could you contact us via this form [here](https://jetpack.com/contact-support/?rel=support&hpi=1)
   so we can take a look?
 * Thanks!
 *  Thread Starter [macde](https://wordpress.org/support/users/macde/)
 * (@macde)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/staging-push-taking-staging-code-with-it/#post-14917814)
 * The push is omitting the wpconfig.php file and Cloudways have confirmed this –
   and yet the code is still pushing across every single time!

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

The topic ‘Staging push taking staging code with it’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [macde](https://wordpress.org/support/users/macde/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/staging-push-taking-staging-code-with-it/#post-14917814)
 * Status: resolved