Multi-site Subdirectory site not found

I setup this Trellis environment months ago and I’ve been successfully deploying to both staging and production servers for a while now. It was only a week or two ago I deployed to staging without error.

I come back to deploy to staging today and I get the following error:

Error: Site '<redacted>/subdirectory' not found. Verify `--url=<url>` matches an existing site.

I haven’t made any significant changes that make me believe I did anything to cause this. I am still able to deploy to production just fine without error.

Also, I can’t really find anything that’s relevant to my issue when searching this discourse or on Google.

Good morning, here’s the rest of the error in case this helps.

failed: [–IP REDACTED–] (item=template_root) => {“changed”: false, “cmd”: " wp site list --field=url | xargs -I {} bash -c ‘export url="{}"; echo -n "$url " && wp option get template_root --skip-plugins --skip-themes --url=$url || echo’\n ", “delta”: “0:00:02.826600”, “end”: “2018-03-07 17:38:38.119689”, “failed”: true, “failed_when_result”: true, “item”: “template_root”, “rc”: 0, “start”: “2018-03-07 17:38:35.293089”, “stderr”: “Error: Site ‘–URL REDACTED–/SUBSITE’ not found. Verify --url=<url> matches an existing site.”, “stdout”: “–URL REDACTED-- /themes\n–URL REDACTED–/SUBSITE “, “stdout_lines”: [”–URL REDACTED-- /themes”, "–URL REDACTED–/SUBSITE "], “warnings”: []}

What version of WP-CLI is running on your server?

@alwaysblank

WP-CLI 1.3.0

Thanks!

I can’t say I’ve ever encountered this particular error, but I’ve run into several kind of similar ones that were a result of WP-CLI not being up-to-date. It looks like the latest version of WP-CLI is 1.5.0, so you might try updating it to the latest version. You can ssh in to your server and update it if you don’t want to re-provision, although I’d recommend re-provisioning your staging server if you haven’t tried that already. Re-provisioning shouldn’t break anything, and may fix things, but I usually make a backup image or something before I do it, just in case.

Ok, thanks I will give it a shot…

However, isn’t it strange that I can deploy to production but not staging?

I made a snapshot on DO first then re-provisioned.
I received ZERO errors when re-provisioning.

I went to deploy and am getting the same error :frowning: