# Misconfiguration of wordpress site names

**URL:** https://discourse.roots.io/t/misconfiguration-of-wordpress-site-names/9609
**Category:** trellis
**Created:** 2017-05-15T22:29:52Z
**Posts:** 8

## Post 1 by @android2121 — 2017-05-15T22:29:52Z

For some reason trellis doesn’t see the matching site names for my production config. Here’s my (production)vault:

```
vault_mysql_root_password: <redacted>

# Documentation: https://roots.io/trellis/docs/security/
vault_users:
  - name: "{{ admin_user }}"
    password: <redacted>
    salt: "<redacted>"

# Variables to accompany `group_vars/production/wordpress_sites.yml`
# Note: the site name (`example.com`) must match up with the site name in the above file.
vault_wordpress_sites:
  carre.ninja:
    env:
      db_password: <redacted>
      auth_key: "<redacted>"
      secure_auth_key: "<redacted>"
      logged_in_key: "<redacted>"
      nonce_key: "<redacted>"
      auth_salt: "<redacted>"
      secure_auth_salt: "<redacted>"
      logged_in_salt: "<redacted>"
      nonce_salt: "<redacted>"
```

and my wordpress\_site file:

```
# Documentation: https://roots.io/trellis/docs/remote-server-setup/
# `wordpress_sites` options: https://roots.io/trellis/docs/wordpress-sites
# Define accompanying passwords/secrets in group_vars/production/vault.yml

wordpress_sites:
  carre.ninja:
    site_hosts:
      - canonical: carre.ninja
        redirects:
          - www.carre.ninja
    local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
    repo: git@github.com:dodo/carre.ninja.git # replace with your Git repo URL
    repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
    branch: master
    multisite:
      enabled: false
    ssl:
      enabled: true
      provider: letsencrypt
    cache:
      enabled: false
```

here’s the exact output:

```
Invalid WordPress sites configuration: site names in `wordpress_sites` must
have matching entry in `vault_wordpress_sites`.

Sites without a matching vault entry:
* `carre.ninja`

Update `group_vars/production/vault_wordpress_sites.yml` to continue.

Docs: https://roots.io/trellis/docs/wordpress-sites/#passwordssecrets

fatal: [138.197.3.141]: FAILED! => {
    "changed": false, 
    "failed": true
}
```

---

## Post 2 by @fullyint — 2017-05-15T22:39:56Z

Here’s a long shot, but just maybe…

> [@Provisioning a new digital ocean droplet](https://discourse.roots.io/t/provisioning-a-new-digital-ocean-droplet/7871/14):
>
> Do you have the [same IP address](https://discourse.roots.io/t/production-server-provision-configures-staging-envs-if-hosts-are-the-same-bug-or-intention/6090) in `hosts/production` as you do in `hosts/staging`? If so there is a slight chance this could be the cause of the error you see (but I doubt it).
> 
> It is not recommended to put the staging and production sites on the same server, so the IP should differ between `hosts/production` and `hosts/staging`.

---

## Post 4 by @android2121 — 2017-05-16T01:18:22Z

I changed the hosts for production and staging to be different. Still no dice.

---

## Post 5 by @fullyint — 2017-05-16T01:31:32Z

I remember a thread (and cannot find it) in which someone reported that Ansible was reading variables from an old temp file that their text editor had left in `group_vars`. I can’t find the thread. If it were vim, the filename might be something like `.vault.yml.swp`. Maybe you could check for such files with a command like  
`find . -name "*vault*"`  
(run from the root of your Trellis project)

---

## Post 6 by @kenanfallon — 2017-07-06T07:34:47Z

I had the same issue when provisioning a new environment.

In the end it was caused by the Site Name being the same in the **Staging** and **Production**  **wordpress\_site.yml** files, even though they had matching vault entries in their respective Production / Staging folders.

---

## Post 7 by @jrgd — 2017-10-02T11:20:24Z

thanks to your mention of old temp file I managed to get rid of s similar issue; I renamed the files to keep a backup, but i had to move them out of the directory to sort out the issue. Somehow Ansible/Trellis was still referring to those instead of the new ones for some reasons…

---

## Post 8 by @nontro — 2018-05-15T20:23:38Z

I had the same problem  
it was due to an error in the wordpress website name in development  
**wordpress\_site.yml** and **vault.yml** files

now I got this error:  
unable to connect to database, check login\_user and login\_password are  
correct or /root/.my.cnf has the credentials.
