Question re bedrock & push to staging

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.

1 Like