TOO_MANY_REDIRECTS (*not* multisite or https)

This is my first time trying to set up Trellis (Windows 10 + virtualbox), everything seemed to have gone to plan-ish but when trying to view the wordpress site for the first time I’m getting stuck in a permanent redirect loop to


Googling this issue seems to be recurring with regards to https or multi-site neither of which I’m using.

During the initial vagrant up process, I did receive this error. However, subsequent vagrant up --provision do not yield the same issue, but maybe it’s still related.

TASK [wordpress-install : Setup Permalink Structure] ***************************
System info:
  Ansible; Vagrant 2.1.2; Linux
  Trellis at "Update wp-cli to 1.5.1"
non-zero return code
Error: Site 'dannyt.test/' not found. Verify DOMAIN_CURRENT_SITE matches an
existing site or use `--url=<url>` to override.
failed: [default] (item=dannyt.test) => {"changed": true, "cmd": ["wp", "rewrite", "structure", "/%postname%/", "--allow-root"], "delta": "0:00:00.140498", "end": "2018-08-25 12:33:40.951650", "item": "dannyt.test", "rc": 1, "start": "2018-08-25 12:33:40.811152", "stderr_lines": ["Error: Site 'dannyt.test/' not found. Verify DOMAIN_CURRENT_SITE matches an existing site or use `--url=<url>` to override."], "stdout": "", "stdout_lines": []}

Here is my group_vars\development \wordpress_sites.yml:

      - canonical: dannyt.test
    local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
      enabled: false
      enabled: false
      enabled: false

Any tips would be much appreciated as to what I might be doing wrong.

As a test could you do a vagrant destroy && vagrant up and see if you get that same error? It seems like that’s where the problem is and if it’s repeatable you can troubleshoot it.

Yes that does cause the same issue. Where should I look next?

Hmmm. It seem like a name resolution problem but that’s kind of a guess. Is this a recent Trellis setup, or an older site that you’re taking over?

Perhaps a Windows-focused team member like @alwaysblank has some Windows-focused advice?

This is a new site setup from a recent internal boilerplate repo based on Trellis with Bedrock. I suspect there is a problem somewhere with that but struggling to find where. The VM has been created, I can ssh into it, WordPress install present in the expected location with expected config (as far as I can tell).


It looks like you have a domain mismatch: dannyt.test vs danny.test. It looks like you’ve configured Trellis to serve the site at dannyt.test but your database still has records saying the site is at danny.test, which causes your redirect. I’d check all your config files to make sure it’s the same everywhere, and also check your db to make sure it has the right url for home & site.

Good spot, unfortunately that was just a typo in my post (apologies!). I will however check the db and anywhere else I can find to be sure.

So, double checking everything, I noticed in srv/www/dannyt.test/current/config/application.php the following:

/* Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);

Setting those both to false and the site now loads :+1:

However, as per my config above, multisite is definitely set to false in the yml file so any ideas what could be causing this behaviour?

Thanks for all the help and patience, it’s much appreciated.