How to safely change a "key" wordpress_sites.yml?

I started developing a new site, full stack Roots.
Installed everything, then vagrant up, and everything was fine.

But then, I saw in wp-admin that my site name was instead of my url
I went back to wordpress_sites.yml , and noticed that I forgot to change the site key from to
So I changed it, then vagrant reload, and…
when I went back to the browser, I had this nasty
500 Internal Server Error (nginx)

Next thing I did was to look inside /srv/www/, but the error log was emty.
However, the error log in /srv/www/ was active, and what I found in it were multiple occurrences of the following error:

2017/09/29 09:12:57 [error] 1552#1552: *11 rewrite or internal redirection cycle while internally redirecting to “/index.php”, client:, server:, request: “GET /favicon.ico HTTP/1.1”, host: “”, referrer: “

Can someone tell me what is going on here?

Is there a proper and safe way to change the site key in wordpress_sites.yml?


Have you performed a search and replace of the database? I recommend using WP-CLI’s wp search-replace function. wordpress_sites.yml controls the nginx config but doesn’t touch the database once it’s provisioned (as far as I know).

On the other hand if you haven’t done a ton of db modifications yet (it seems like you may not have) then you could always just do a vagrant destroy and vagrant up to start with a fresh install of wordpress, this runs the initial provisioning.

It’s also worthwhile to check that landrush is configured to spoof the new domain’s dns, vagrant landrush list.

Let me know where this gets you!


Thank you @gnowland

Since I haven’t done any db modification yet, I took your advice and did a vagrant destroy.
It solved the issue.

Glad to hear it! Most of the 500 errors I get are due to the wrong URL in the WordPress database site_url or home_url, etc. misconfigurations :slight_smile: