Fixing COOKIE_DOMAIN for mapped domains on multisite

Today I learned the hard way that WordPress multisite doesn’t quite support domain mapping out of the box the way I expect it to.

I’m working on a website-as-a-service product called ToothPress (more on that at some point in the future). On a paid plan, ToothPress customers will be able to map their custom domain. My dad is my first beta user, so I changed his domain from to

2016-07-07 at 10.35 AM

Then, I went to log into his dashboard:

2016-07-07 at 10.36 AM

Uh oh, what’s going on?!

As it turns out, WordPress doesn’t magically handle setting the correct COOKIE_DOMAIN. You’ll need to take care of this yourself:

Et voila!


3 Replies to “Fixing COOKIE_DOMAIN for mapped domains on multisite”

Leave a Reply

Your email address will not be published. Required fields are marked *