Promoting Local DB Changes to Staging then Live

I’d spent some time trying to connect to a staging site’s mysql database from a site running local in DevKinsta through an SSH tunnel. I was able to connect to the database via ssh with terminal or with my MySqlWorkbench, but I was never able to get the locally running site to connect to the db for development. I spent a day on chat with Kinsta being told it should work but in the end even they seemed to admit, it doesn’t work barring some solution which they were unaware.

Continuing to think to solutions for using a shared db. Is it possible to connect staging to a separate cloud db, also connect to that db from local, and then have the contents of the cloud db promoted to Live when the site is promoted from Staging to Live?

Welcome to DevKinsta @SendItAgile ! Thanks for the feature request!

Indeed you’ll need to use SSH tunneling to access the database. MySQL Workbench should work for your use case here, though I haven’t tested this myself. I did find this article here that shared success with using this method. To make this easier for yourself, you may also want to use SSH keys to connect. Don’t forget that you don’t want to push these local changes on your wp-config.php to your live site so may want to setup a conditional or separate wp-config.php for your local setup.