Support Bedrock in Local

Creating a parent feature request so that we can drive discussion around if supporting Bedrock in Local makes sense. I’ll grab relevant threads and drop them here, but for now, feel free to upvote!

Greetings Austin. Thank you for this. It feels like this is already very close. I am pretty sure that I almost have this working. The last thing I am trying to figure out is how I might be able to change the Nginx {{root}} on a per-site basis. I believe this would allow for the necessary app/bedrock/web path to be set. Perhaps there is a little more to it. I would love to help if at all possible.

I use Bedrock for every single one of my websites for work. Personally, I don’t mind modifying the conf/nginx/site.conf.hbs file to point to the new server root, but my biggest pet peeve is that LocalWP doesn’t accurately reflect the WP version since it’s looking for the app/public/wp-includes/version.php file.

It also throws annoying errors if you delete the app/public/wp-config.php file, even though the application works just fine, so I usually leave that file in there to avoid that issue.

If I could have one wish, it would be that LocalWP could detect the actual WP version and wp-config.php file from the actual source, not a hardcoded path to the app/public folder. Even better would be an extension for LocalWP which allows you toggle enable a “Bedrock” configuration and automatically enable these modifications.

3 Likes

This gets an upvote from me. Being able to set {{root} would not just benefit Bedrock, but everyone who needs to set WordPress up in a non-standard location. On one site I have WP in a subdirectory of /blog and this breaks all sorts of things, from Local UI to SSL cert errors.

I found this posted in the workflows section - haven’t tested myself yet but it looks to be an actively maintained Local extension for bedrock support:

DekodeInteraktiv/localwp-projectbase-addon: Adds extra features for project base setup (github.com)

2 Likes

This worked well, but for i found it had issues with single sites over multisites.
I have created modified version of this extension here that i have been using to install local bedrock projects.

1 Like

Would love to just be able to choose to setup a Bedrock install in local by default.

Creating a symlink (mac) dealt with the version issue:

ln -s web/wp/wp-includes wp-includes

Curious if anyone knows the internals of how the 1-click admin works, so as to come up with a workaround (or if you already know a workaround, even better!).

2 Likes