Hi there!
I’m trying to use Bedrock on Local version 5.0.7+1117 on Windows and I am having some issues.
I was following this guide and the problem I have is that replacing the "{{root}}"; to /app/bedrock/web; in conf/nginx/site.conf.hbs doesn’t change the root directory so I get these errors:
I have the same problem… After watcing this video, I was going to try “Local by Flyweel”. But now its not really an option for me since I do all my devlopment in Bedrock / Sage-theme
Note, the path that shows for the site inside Local is ~/Local Sites/bedrock-test. Nginx doesn’t work with ~/, so you’ll need to swap it out with one of the following:
macOS: /Users/YOUR_USERNAME
Windows: C:\Users\YOUR_USERNAME
Linux: /home/YOUR_USERNAME
If you are using Bedrock or change where wp-config.php is, you will see errors on the Database tab in Local like in screenshot that @teddy posted above. Don’t fret! As long as you configure the .env file in Bedrock to match up with the defaults shown in the Database tab, the DB connection should be good to go!
Hello there, i’m having the same issue with Local v5.0.5 (Mac version).
After creating a new site following that bedrock & flywheel video, i updated the site.conf.hbs (since root is not defined on nginx.conf.hbs) just the way you said @clay.
Then i restart Local and start the bedrock site, but nothing changes, Database tab still shows “Unable to find DB_NAME in app/public/wp-config.php” even after updating the root to:
Also i was not able to update the path that shows for the site inside Local, still shows ~/Local Sites/bedrock, how i’m i supossed to do that?
Am i missing something or is this method not possible with this Local version?
Update: even if the database tab shows those “Unable to find…” the site is actually working (site and admin), so i guess it’s a Local warning that uses the default path just for that check?
I tried doing the same thing but I keep getting a 502 error when I try to access the website (using the v5 Local beta). I modified the nginx.conf.hbs file to put the root location in at the top of the file. Is it supposed to be here? Should I just let this go and install the older v3 of the tool and try to use that?
Rather than installing an entire plugin just to fix a single link, you can add the equivalent rule directly in site.conf.hbs (I place this beneath the “WordPress Rules” block):
You can ignore the slash reversal in the path you’re seeing. However, the error indicates Wordpress can’t find the wp-blog-header.php and I can reproduce your error by renaming that file, so ensure it is available at the path shown.
Also, you can apply a relative path modifier for the root path declaration, e.g. root "{{root}}\web";
After installing Bedrock in my Local environement and set the settings of both files .env and site.conf.hbs I am redirecting to my localhost Apache server ( /var/www/html ) instead of the Local wp server.
I tried many times to reinstall but I still have this weird behavior and I’m confusing if someone have a hint it would be nice !
Sounds like you need to enable localhost Router Mode under Preferences > Advanced > Router Mode. Local can’t use the default site domain mode when another application (Apache, in your case) is using port 80 or 443.
Thanks for the help but the localhost Router Mode was already enabled in my preferences.
Also if I make a normal install without using bedrock, it’s working correctly with the default settings, so I think that is when I install bedrock and set the settings that something is messing up…
I take screenshot of my panel :
OK, I think I see the problem. Your site is hosted at localhost:10000, but you’ve set WP_HOME as https://bedrock.local, which is why Apache is responding (as it has ownership of ports 80 and 443). Change it to http://localhost:10000 (remember, HTTPS isn’t supported in local router mode) and you should be set.