• Hello All,

    Here is my situation. I am moving a site from a different host to my server. I have a multisite subdomain configuration. I created a new subdomain for this site on my multisite config. The new site is not my root site. My root site is https://www.myrootsite.com with ip address 111.111.111.110. The new site (the one I’m moving from the other host) is mynewsite.myrootsite.com with an ip address of 111.111.111.111. Everything has gone very well up to this point as I was able to use mynewsite.myrootsite.com/wp-admin to build all the pages. However, now that it’s time to productionize the site, things are not working. Here’s what I have done: I changed dns to point https://www.mynewsite.com to 111.111.111.111. I went into network admin -> sites and changed the site url for mynewsite.myrootsite.com to https://www.mynewsite.com and clicked save. This has allowed people to view https://www.mynewsite.com which is working fine. However, now when I try to go to https://www.mynewsite.com/wp-admin and sign in with my credentials, I get the following error:

    ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

    If I go back into network admin -> sites and change the siteurl back to mynewsite.myrootsite.com I can get to wp-admin ok I need the url to be the production url which is https://www.mynewsite.com. Anyone have any suggestions? Is there a redirect rule I have to put in or a configuration in the multisite plugin that I’m missing?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    I found a response in this forum to what seems to be like the same question you are asking. The post title is “[closed] Cookie Error when Logging In (117 posts)” by Kevin. The answer was posted by “niosus” seems to be correct. Here is what niosus wrote.

    I encountered the same issue and have managed to make it work, and a theory of what could be the issue.

    First of all, how to get logged in again. Comment out lines 744-746 in wp-login.php . It should look like this:

    //	if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
    //		$user = new WP_Error('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='https://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
    //	else
    		$user = wp_signon('', $secure_cookie);

    This will bypass the check entirely and logs you in.

    At first I didn’t understand why it might fail, but then I remembered I am running behind a Varnish cache which filters out all but some select cookies. I haven’t checked, but I am fairly certain that my Varnish setup filters out the WordPress test cookie when it receives the login request (the actual POST with the login data). Is it possible all of you are running behind a proxy which filters cookies?

    This is pretty sloppy by the WordPress team. They could also just test the session cookie. If THAT one doesn’t get through, it will fail anyway. Completely breaking when a test cookie is missing should not happen.

    I hope this helps…

    Jon (Kenshino)

    (@kenshino)

    Lord Jon

    Do NOT edit core files.

    @fp5885 have you read – https://codex.www.ads-software.com/Moving_WordPress ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't rename my subdomain on multisite’ is closed to new replies.