We recently moved from another host and I’m in the process of re-building our deployment workflows for Kinsta.
Our site was initially migrated from the old host a month ago using a plugin (WP Migrate Pro), so the copy that’s live on the server doesn’t have any of the git files.
I have a local copy of our repository displaying in DevKinsta, and I’m trying to pull down our production site using DevKinsta to confirm whether there’s anything on Kinsta which has updated since the last check in on the repository. However, when I do this, it overwrites my local git files and then I have to git init and hard reset from the repository again. Is there anyway to sync with production without overwriting git files?
Once I know I’m locally in sync with both production and our git repo, my plan is to activate the Github Actions I’ve set up to push directly to Kinsta from Github.
Hi @juliaset ! When you say you have a local copy of your repository in DevKinsta, are you referring to just having git set up in a DevKinsta site container, and you’ve been doing pulls/pushes from there?
Generally speaking, before doing a push from the Live site container, you’d want to do a pull down to that container to merge any changes, so it doesn’t overwrite what you’ve already got in place in your repository. Am I misunderstanding what you’re trying to do?
I’m not trying to push to Live from local – I’m trying to sync a local repo with live so that I can start using Git Actions to handle the deployment.
I ended up using FTP (which took over an hour LOL) to copy down files from live to my repo (inside the container) without overwriting the git files. Then I was able to check if any of the files from Live were changed from the repo (there were a couple), in order to make sure it’s all in sync.
@JovanaDjordjevic@jackirish Thank you. I’ve implemented this and got it working with our staging environment and github, but when i try to do the same for production, I can’t seem to get it to work.
I’m assuming I should be using my same private key on staging and production, using seperate github workflow yaml configs that translate secrets for the port numbers and passwords of the two environments?
I am sorry to hear that you are experiencing difficulty with setting up this workflow on the production environment. We are happy to further assist you with this!
I believe what you have described regarding the private key, and workflow yaml files is correct. However, to be able to better assist you I would like to get a bit more information. Do you see any errors occur when attempting to run the action? If so, would it be possible to please share details about that error with us? That information will assist us in our investigation.
@Andrew Thanks for your response. I ended up figuring out that I had previously set the Prod site to restrict access to only whitelisted IPs, so I had to turn that off. Then I was able to connect.