Question re bedrock & push to staging

When I tried to push to staging using a bedrock site, devkinsta got stuck right at the end when trying to update the paths in the database. I’m actually not sure if the database got pushed at all.

I was wondering if the problem was caused by using .env files in bedrock which contain the database connection details, and maybe devkinsta is looking for wp-config file instead?

Is there a workaround for custom setups like this? Or for now are we better of using sftp to upload files and manually uploading the database via kinsta? (This was my solution in the short term).

Trying to push to staging through devkinsta actually scuppered the whole system and I ended up deleting and reinstalling.


Hi @designlobby., thanks for reaching out!
Can you please private message your staging url to me?
I’ll try to recreate the same bedrock setup to reproduce the issue you are having. I know that MyKinsta sometimes has issues with pushing bedrock sites between environments. That might be what’s happening here.

Thanks for sharing @designlobby !
I think what you are doing right now may be best solution until we have built-in support for Bedrock.

Here’s what’s happening:

First, DK needs to find a wp-config.php file in whatever the root directory is when using wp-cli. If there is no standardly formatted wp-config.php, the process fails.

If you add a wp-config.php in ~/public with the connection credentials, the process will fail during the search and replace because wp-cli won’t be pointing to your …/web/wp directory by default.

So to get past these errors you need to add a wp-cli.yml file in ~/public that sets the path to your wp directory and also add a wp-config.php there since Bedrock moves that up a directory/formats it differently.

That gets you past the errors but it still won’t look pretty once it reaches staging. The only advantage would be that DK transfers the files/database but you would likely still have to do some search and replaces in both files and databases (if you don’t have your Bedrock environments set up) and delete that new wp-config.php since it will cause a “white screen” when it overrides Bedrock’s configuration.

I’m going to bring this up with our Developers again so we can hopefully have a cleaner solution that maybe involves reading the .env variables/recognizing Bedrock installs better.