Local Community

Bedrock on Local 5.9.2 --> Request Error 502

Trying to get Bedrock to work, but no luck.

I’ve followed instructions here, following instructions from this thread, so far all I get is Error 502.

Probably I’m missing something really basic.

The site resides in /Users/philby/Sites/bagroots/app/bedrock, and this is what I entered into site.conf.hbs for root before restarting the site multiple times. Still NGiNX doesn’t see it, and claims kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: bagroots.local, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:10179/", host: "bagroots.local".

Anyone have a clever idea what I could do to get this to work? Unfortunately I have a client with a Bedrock/Sage based site, or else I wouldn’t really bother with all this «oh we’re soooo much more clever than everybody else, we’ll change just about everything of how WordPress works» nonsense.

It’s been a while since I’ve tinkered with a bedrock site, but here are a couple of things you might try:

  1. Try stopping the site and restarting it. I don’t think this would fix things, however, doing so will re-compile the nginx configuration file and so is a good first troubleshooting step.

  2. Is instant reload active on the site? I know that some users have had issues with similar symptoms (in their case, 502 when updating plugins) when instant reload is active. You might try deactivating Instant Reload and see if that helps.

  3. Does switching to localhost router mode under “Preferences > Advanced” help? Doing this will remove local’s router from the equation so that you’re making requests directly against the computer’s port number for the site.

Thanks @ben.turner for the help.

Unfortunately, none of it made the Bedrock install reachable, so I hacked the crazy Sage theme file structure and the database and installed it all as a normal WP website. There’s errors here and there, some weird file paths for fonts and stuff, but its workable for the moment, so I’ll delve into this at a later date.

Just switched the site over to Apache instead of NGiNX.
By tinkering around I’ve gotten from 403 forbidden to some PHP errors to a white screen. :man_with_probing_cane:
Edit: white screen is just the front view, login into admin miraculously works. :tada:

Now on to installing Sage with its zillions of silly dependencies and libraries and forced workflows but no Gutenberg support.

Great job drilling into that!

Too bad this forum software only allows me to “like” something – I wanted to react with something closer to “I feel your pain”

So here’s a reply with some emojis :smiley:

:skull: :computer:

:shaking_fist:

Just to quickly recap: getting Local to work with Bedrock is possible, one just has to use Apache and not be troubled by a consistent «This site’s WordPress URL settings do not match the host set in local» warning.

Cloning and/or importing a Local export to a different URL both do not work out-of-the-box:

Bildschirmfoto 2020-11-23 um 07.15.00

{"thread":"main","class":"h","message":"wp-config.php does not exist. Can't update DB info.","level":"warn","timestamp":"2020-11-23T07:44:43.216Z"}
{"thread":"main","class":"SearchReplacerWPDatabaseDomain","level":"info","message":"Changing database domain for JYZ0NgmVl","timestamp":"2020-11-23T07:44:43.269Z"}
{"thread":"main","class":"h","level":"warn","message":"Unable to update site domainCannot read property 'replace' of undefined","stack":"TypeError: Cannot read property 'replace' of undefined\n    at exports.default.replaceConstant 

Local much prefers standard WordPress setups, as do I.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.