# Deploy, install, redirect loop

**URL:** https://discourse.roots.io/t/deploy-install-redirect-loop/4565
**Category:** trellis
**Created:** 2015-08-25T04:59:47Z
**Posts:** 11

## Post 1 by @scott_streit — 2015-08-25T04:59:47Z

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.

[Americanshoallight.com](http://americanshoallight.com) results in a redirect loop error page while [the admin console](http://americanshoallight.com/wp/wp-login.php) will load ok.

Has anyone else seen this? Any suggestions?

---

## Post 2 by @ben — 2015-08-25T05:07:13Z

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

> <https://github.com/roots/trellis/blob/882779238b1cad42912c065d57dc1bacb3cddf6d/roles/nginx/defaults/main.yml#L4>

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

---

## Post 3 by @fullyint — 2015-08-25T05:08:38Z

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.

---

## Post 4 by @fullyint — 2015-08-25T05:11:20Z

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

> [@Brain imploding trying to get bedrock + bedrock-ansible running... please help](https://discourse.roots.io/t/brain-imploding-trying-to-get-bedrock-bedrock-ansible-running-please-help/3592/13):
>
> This has happened to me when I had similar issues with Multisite. Clear your cache, including cookies, and I think you should be able to login.

---

## Post 5 by @kalenjohnson — 2015-08-25T05:22:39Z

Hey, I resemble that remark

---

## Post 6 by @scott_streit — 2015-08-26T03:00:41Z

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

---

## Post 7 by @XedinUnknown — 2016-02-18T19:56:22Z

Hi,

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.

Thanks.

---

## Post 8 by @Sanjay_Mittalla — 2016-02-22T21:56:10Z

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.

---

## Post 9 by @XedinUnknown — 2016-02-25T13:47:21Z

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.

---

## Post 10 by @ben — 2016-02-25T15:36:33Z

> [@XedinUnknown](#):
>
> 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.

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.

> [@XedinUnknown](#):
>
> Any clues? I wanted to move from VVV to something more serious, but already had a lot of headache trying to set this up.

What have you done so far to debug your issue?

> [@XedinUnknown](#):
>
> Very annoying and disappointing. Especially due to lack of replies from Roots staff.

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.

---

## Post 11 by @mZoo — 2016-05-19T01:49:36Z

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:

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