I have a multisite located at example.com which has a subsite located at subsite.example.com.

I followed the official Wordpress.org documentation to map subsite.example.com to otherexample.com


The public site maps perfectly to otherexample.com (all links work correctly).

However, in order to access the Admin Dashboard for subsite.example.com, I must add define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); to my wp-config.php

After adding define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); to my wp-config.php, wp-cli starts to throw a bug bug that is nearly a decade old:

PHP Notice:  Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1277) : eval()'d code on line 106

I found this github thread from 2013 that has several workarounds, but I would like to know if there is a more recent / efficient solution to problem?


seems odd to apply solutions that are nearly a decade old..

Any tips?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.