Deploy, install, redirect loop

I’m getting a redirect loop when trying to load my site after a deployment. These is what is going on.

  1. Provision DIgital Ocean Droplet. - finishes successfully, no errors.
  2. Deploy to server - finishes successfully, no errors.
  3. Run through WordPress install

Here are some things I have noticed.

After setting up a user during the WordPress install I cannot ever login with the username and password I created in the previous step. results in a redirect loop error page while the admin console will load ok.

Has anyone else seen this? Any suggestions?

Is it possible that you configured your site to have www, but didn’t set strip_www to false? See this file:

If so, try making that change and then provisioning the server again.


I seem to remember a weird redirect loop thing like that with multisite. Let us know if you’re using multisite and I’ll see if I can find the old discourse thread.

If indeed it is multisite, here’s a note from smarty pants @kalenjohnson:

Hey, I resemble that remark

Thanks @benword. You nailed it. Huge thanks to you and the rest of the team.


I just tried Trellis + Bedrock for the first time. After vagrant up (had some problems with NFS initially), accessing /wp-admin/ gives a redirect loop.
Additionally, accessing /wp-login.php yields 404. All styles and scripts on the frontend do too, but that’s likely because theme compat is not made to work with a custom wp-content URL.

Any clues? I wanted to move from VVV to something more serious, but already had a lot of headache trying to set this up.


I’m having the exact same issue. I’m new to trellis, ansible and everything that’s in the box basically, so I’m pretty lost as what to do next. wp-admin goes into redirect loop, all scripts and css on homepage 404s.

I suspect it has something to do with wrong wp_siteurl but I’m not sure.

WRT the 404s you are getting, that is probably because there is no theme, and therefore theme compat kicks in. However, Bedrock renames the wp-content directory to app, and since the files in theme compat are old and deprecated, then are not influenced by this change and continue to point to wp-content.

The redirect loop I have no idea about, it is still happening for me, and that’s why I abandoned attempts to make it work. Very annoying and disappointing. Especially due to lack of replies from Roots staff.

Not sure what you mean by this statement. There’s nothing that should ever prevent any theme for plugin from working in the app directory. Check the config files to see how this is handled — it’s supported by core WordPress. Nothing hacky going on here.

What have you done so far to debug your issue?

We’re available for paid support. Otherwise, you’re expecting way too much from an open source team that puts in volunteer hours on this forum. You’ve yet to list specifically what you’ve tried to do to solve your problem.

1 Like

I would be interested to know

  1. the current configuration for keeping the www in the url
    I know you can set the following in wordpress_sites:

    wp_home -
    wp_siteurl -

  2. The reasoning behind making sans-www the default url.