Brain imploding trying to get bedrock + bedrock-ansible running... please help

Hi Kalen,

I’m truly sorry if I didn’t grasp the right topic of this thread or misused discourse in any way.
To clarify, I wasn’t asking anything, I was trying to help @timichango with his login error.
I noticed that the “redirect_to” attribute in the URL he provided was to “/wp-admin”, not “/wp/wp-admin”, which redirects to /wp/wp-login with no user feedback which is what he seemed to experience.

Given your answer, I probably misunderstood the issue at stake here and I apologise once again for interfering.

Hey jchapron, no sorry my mistake, I thought you were asking your own question. Thank you for helping out :slight_smile:

Thank you for this. +1 to add this to the docs.

Or you can bypass all that which is what I normally do before provisioning and go into trellis/roles/nginx/templates and edit wordpress.conf switching out

location / {
  try_files $uri $uri/ /index.php?$args;
}

for

 location / {
    try_files $uri $uri/ /index.php?$args;
  }
  rewrite ^/(wp-.*.php)$ /wp/$1 last;
  rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;
  location ~* ^.+\.(jpe?g|gif|js|css|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mp3)$ {
    expires 30d;
    rewrite ^/(wp-(content|admin|includes).*) /wp/$1 break;
  }

Then you are able to swap out in your wordpress_sites file

wp_home: http://example.dev
wp_siteurl: http://example.dev/wp

for

wp_home: http://example.dev
wp_siteurl: http://example.dev

Then your multisite functions just like it wasn’t set up in a subfolder and it drops all instances of the /wp/ out of all your links, you can go right in between network admin and sites, I used to have to manually go in and add /wp/ into the database because it would never get confirmed right for multisite, and I would get white screens in between network and site admin areas.

Just for reference my code snippet came from

I have been using it for months on multisites live and in development never a problem. Any reason you guys don’t use something like this standard? Makes it seem much more fluid in my opinion for users and admins

2 Likes

Oh and for the WP-CLI errors you just need to pass --url=example.dev at the end of your command, for multisite it doesn’t know what site it is supposed to be targeting so you just tell it the root domain, then commands work as expected

Also I have found I need to be in the /web/ folder with the wp-config file, even though there is a wp-cli config file telling it where your wp-config file is, this only happens to me sometimes, 90% for the time now if it has to do with the database I just jump into mysql -u root -p and just do what I need to do because wp-cli and multisite I do not think is perfect by any means