Hello everybody, I am currently struggling with setting up multisite domain mapping on a WordPress multisite in a Bedrock (Docker based) setup with nginx as a web server.
I have set up the multi site as described in the WordPress documentation with subdomains instead of subdirectories. E.g. site1.example.com, site2.example.com etc. (define('SUBDOMAIN_INSTALL', true);
).
I also have set COOKIE_DOMAIN
to $_SERVER['HTTP_HOST']
.
Now I want to set up a mapping so that the sites are accessible through site1.com, site2.com etc. (their own FQDNs).
According to the documentation, I'd just have to change the URLs for the sub sites. This works so far as that I can access the site (let's use site1 as an example), but when I try accessing the dashboard, I get redirected to example.com/wp-signup.php?new=site1.
I also noticed that changing the site's URL also changes the "home" setting to http://site1.com, but not the "siteurl". When changing "siteurl" to also be http://site1.com, I can access the dashboard of site1.com but only after an additional login.
However, the whole purpose of the Multisite Setup for me was do not having to log into each site's dashboard individually, otherwise I'd just put each site in its own Docker container.
Does anybody have some hints regarding this issue?