There’s probably a few ways to go about doing this.
I think if you are adding code to the wp-config.php
file, then you probably don’t need to those conditionals since the wp-config.php
file doesn’t usually “travel” with the site. By that I mean, that something like Local Connect doesn’t deploy the wp-config.php
file when pushing a site up to the server.
Because of this, you can just add this to your Local site’s config file:
define('MY_ENV_VARIABLE', 'xxxxxxxx');
this to your staging site’s file:
define('MY_ENV_VARIABLE', 'yyyyyyyy');
and so on.
But if you are wanting to have this code “travel” with the site, then you’ll likely want to put that code in a Must Use plugin
Again, you can either reach out to Flywheel support to add the specific environmental vars to the remote site’s wp-config.php
file, or if you go the “Must use plugin” route above, then Flywheel should be setting the value for staging
and production
for you.
I’m not sure, but that video doesn’t seem to cover how they deploy the site once it’s ready to go live.
As it is today, there really isn’t any Bedrock integration with Flywheel (or WP Engine) – both of these managed WP hosts have custom configurations that are very different than what Bedrock recommends. Because of this, many of the reasons to choose a Bedrock installation don’t make sense if your remote environments are hosted at WP Engine or Flywheel.
I used to use Bedrock and the larger family of Roots.io things, but now, I pretty much only use their Sage theme. A big reason for this is that I no maintain my own DigitalOcean boxes using Trellis. For me, the cost savings of a $5/mo DO box wasn’t enough of an incentive to just pay more for a Manage WordPress hosting provider.
That being said, if others in the community are using some sort of custom CI to deploy to FW or WPE, I’d love to hear more!
Hope that helps untangle and clarify things! Let us know if you have any other questions!