When importing a site INTO devKinsta, it has an option to “import backup” which wants a zip file I believe.
however, there’s no option that I’m aware of to export a local site into a zip file.
On Kinsta, you can request staging and production to be compiled into a backup file which is emailed to you.
How are people doing this for local versions of code + db?
My situation is that I have an outdated version of my company’s site on my local devKinsta
I want to be able to make a backup of my local version, then copy the production version from Kinsta into devKinsta, but be able to refer back to my original local if needed.
I cannot have a local version of production pulled down without removing my current local - due to conflicts.
Any solutions to this problem?
Hi @rpearson, thanks for reaching out. You essentially just need to create a ZIP with your file directory and a DB export.
You can use this command to create an export of your database (on a standard WP setup):
docker exec -it devkinsta_fpm bash -c "cd /www/kinsta/public/SITENAME && wp db export --allow-root"
You can then create a ZIP with your SQL file adjacent to your files `~/Devkinsta/public/SITENAME from your filesystem using your ZIP tool of choice.
The process will be a bit different depending on OS but feel free to let us know if you have any questions.
Thank you, looks like the db exported into a sql file properly w/ that command.
I then used Mac OS to select both .sql and the site folder and right clicked “compress” which zip’ed the site together.
Hopefully I don’t have to use it, but it’s nice knowing I should be able to import this zip into devKinsta and DevKinsta will know what to do with it (I’ve zipped just the public/sitename folder in the past, and when I tried to import via devKinsta it gave an error)