Hey !,
I have been trying to search the net for some tutorial for installing bedrock and sage with Local by Flywheel and sadly I have not come across any solution where I can do this.
Can someone please help/guide me in setting up bedrock + sage work flow with Local?
I’m looking to move to a Bedrock setup and want to use Local instead of Trellis so any thoughts on how to use Bedrock with Local would be appreciated.
I would really love a more detailed guide for this. I managed to get the site up and running with bedrock and Local by following these steps but there are a few questions…maybe someone can point me in the right direction?
I cannot get wp-cli to work, error - cannot find DB.
The paths to the database constants (in tab database) is still /public/wp-config and I cannot find where this path is set. Can’t use the Adminer, only sequel pro.
Any help? Sorry i’m very new to both Local and Bedrock so it would be great if someone could help further. Thank you.
I’m up and running with a Bedrock structure in Local by Flywheel.
Are you running your wp cli commands in the docker container via Site SSH? You can’t run it in your local filesystem. You need to ctrl-click on the app in Local and access “Site SSH” to run any commands that involve the database.
I’m not seeing path errors in the database tab. Depending on what server you setup (Nginx or Apache) you need to edit the relevant file in /conf/. For me that was /conf/nginx/site.conf and I had to set “root /app/web/;”
Let me know how you go. I know how frustrating it is to try and get a solid, modern workflow happening.
For now, I’m looking forward to using a Bedrock structure with Local by Flywheel and deploying with bedrock Capistrano.
Got it, did not find the right-click shortcut, thanks!
Did just that in my site.conf, have ngnix just as you recommended in post before. But still getting Unable to find DB_HOST in app/public/wp-config and all the other variables as well. Change of siteurl does not affect the DB either. I also did a restart the server to se if the database tab would update when I updated the conf file, but no. Even stopped site and quit local and the restarted everything again. Do I need to change anything else?
Oh, and you shouldn’t have an app/public folder if you are setting up Bedrock — see Clay’s step 2 above in which /app/public is deleted.
The only wp-config.php file should be in /app/web and is a very minimal and bedrock-specific:
<?php
/**
* Do not edit this file. Edit the config files found in the config/ dir instead.
* This file is required in the root directory so WordPress can find it.
* WP is hardcoded to look in its own directory or one directory up for wp-config.php.
*/
require_once(dirname(__DIR__) . '/vendor/autoload.php');
require_once(dirname(__DIR__) . '/config/application.php');
require_once(ABSPATH . 'wp-settings.php');
Here’s a screenshot of my ~/Local Sites/bedrock_test/ directory:
Yes .env is updated with the settings as you explained, just like yours. The site works and runs on the database. I know that because If I make changes to the database (which i can only access via sequel pro, not via adminer) it makes changes to the site.
I don’t have the app/public folder. I did just as I should. But Local still looks for a public folder even though I changed root and restarted server.
Thats the exact wp-config I have as well (bedrock, as you say)
My structure looks exactly like yours
I have doubled checked everything, even made this process twice now to see if there is something small im doing wrong. But i cannot get it to work.
As I said everything is up and running It would just be nice to access database via adminer if thats meant to work.
My problem is
I cannot access adminer. Database tab in Local Flywheel saying: Unable to find DB_HOST in app/public/wp-config even though I changed the .conf file in ngnix->site.conf to root /app/web/.
Also the nice feature to change domainname and database just follows is not avalible.
But maybe im trying to fix something that should not work? It’s ok to use sequel pro and everything is up and running so, it would just be nice to use all the features Local has to offer.