# How to push to a clean staging?

**URL:** https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435
**Category:** Application Support
**Created:** [April 22, 2022, 9:18am UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435 "2022-04-22T09:18:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![alanj](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@alanj](https://community.kinsta.com/u/alanj)
#### Post date: [April 22, 2022, 9:18am UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/1 "2022-04-22T09:18:55Z")

</div>

How do you push a new site developed locally to Kinsta?  
I can only push to a staging site, but doing that requires the staging site to pre exist. This means it is cluttered up with all my current sites stuff - esp all the plugins. So when the push happens I now have a hybrid staging site full of the old stuff as well as the new.

What I really want is to be able to push to a brand new clean and empty staging site. Is this possible?

Cheers  
Alan

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [April 22, 2022, 4:14pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/2 "2022-04-22T16:14:23Z")

</div>

Hi @alanj, thanks for reaching out! yes it’s possible. You can either completely [delete the staging environment](https://kinsta.com/help/staging-environment/#delete-staging) then recreate it, or you can contact our Live Support team and ask them to “reset” your current Staging environment.

---

<div class="post-metadata">

### Author: ![alanj](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@alanj](https://community.kinsta.com/u/alanj)
#### Post date: [April 22, 2022, 4:58pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/3 "2022-04-22T16:58:06Z")

</div>

Thanks, I’ll try support. But not sure what a “reset” really is, won’t they just recreate staging rather than provide a blank canvas to push to?

Deleting and recreating staging doesn’t help, as the new staging pulls the current live. In this case I have built a brand new site on DevKinsta and want to replace the live site with it. Hence the need for a fresh clean environment.  
I’d hoped that the push would overwrite the entire environment but it doesn’t seem to, but rather merges things.

Cheers  
Alan

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [April 22, 2022, 5:05pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/4 "2022-04-22T17:05:25Z")

</div>

Got it, so in that case all you really need is for the ~/public directory to be deleted/cleared out and maybe the database to be dropped/recreated.

You can just ask our support team to “Reinstall WordPress,” which will give you brand new/fresh WP install. I believe that will only come with the default plugins like “Hello Dolly” but you can then ask for ~/public to be cleared as well in order to get a 1:1 transfer from Local to Staging.

I’m going to bring this up with our devs, though because I agree that we should at least have the option to completely overwrite instead of always merging.

---

<div class="post-metadata">

### Author: ![alanj](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@alanj](https://community.kinsta.com/u/alanj)
#### Post date: [April 22, 2022, 6:37pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/5 "2022-04-22T18:37:56Z")

</div>

Excellent thanks.

Yes I could do it myself via sftp but it would be nice for it to be a one click operation.  
Actually the same issue applies moving from Staging to Live on Kinsta. Looks like the push there is the same format.  
Cheers  
Alan

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [April 22, 2022, 10:11pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/6 "2022-04-22T22:11:51Z")

</div>

So pushing Staging to Live _should_ be overwriting things in MyKinsta. If you’re able to reproduce this issue there please reach out to our Live Support so they can look into what’s going on.

I tested my own site/Staging and it wasn’t merging files/plugins that way. Either way, chat support would be able to look into it closer/make sure the Staging Push process is working as intended.

---

<div class="post-metadata">

### Author: ![alanj](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@alanj](https://community.kinsta.com/u/alanj)
#### Post date: [April 23, 2022, 9:33am UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/7 "2022-04-23T09:33:34Z")

</div>

Ok. I was just going from reading. Its says it will push “changes” which to me implies a merge rather than an overwrite. But I haven’t tested it for my live site yet.  
Thanks again  
Alan

---

<div class="post-metadata">

### Author: ![alanj](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@alanj](https://community.kinsta.com/u/alanj)
#### Post date: [April 26, 2022, 9:07pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/8 "2022-04-26T21:07:23Z")

</div>

FYI.  
Kinsta support had me create a new staging site. They then ran some script against it to reset it to a blank site. ( Thanks Shane ) I was then able to push from DevKinsta to Staging ok and I was able to push from Staging to Live.  
So the process works. Just a small bit of automation perhaps to make this one click direct from DK?  
Cheers  
Alan

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [April 26, 2022, 10:09pm UTC](https://community.kinsta.com/t/how-to-push-to-a-clean-staging/1435/9 "2022-04-26T22:09:40Z")

</div>

Thanks for the update @alanj, our devs are working on a future update that should resolve this. Instead of merging files we may start deleting the “destination” files so you don’t wind up with mixed files/folders.

I can’t think of a situation where merging the files and folders would be ideal so I think our Devs fixing that behavior would address the main issue.

Thanks again for bringing this to our attention!
