• Resolved Saket Jajodia

    (@dzire2dzine)


    I have installed WooCom storfront multisite (complete new setup) with subdomain, after creating subdomain and setting up few things in that subsite (like adding products, child-theme, installed couple of plugins, etc) when I changed the sudomain to custom top-level domain, I am unable to login, even when I tried to add products in cart it is showing empty.

    This is the code that I am using:-

    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'jajodia.in');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Now when I change SUBDOMAIN_INSTALL to false, it starts to work fine but then I won’t be able to add subsite with subdomain.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @dzire2dzine

    I believe its the cookies that are not being set for the domain you are accessing it through, which is why both login & cart functionality doesn’t work.

    I am not very familiar with multisite installs, but you will probably need to define one or more cookie related constants.

    define('COOKIE_DOMAIN', '');
    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    Hope this is helpful.

    I would try adding define('COOKIE_DOMAIN', ''); to wp-config.php first.

    Also, try in a different browser as well, to make sure its not strict cookie related handling of a particular browser.

    Thread Starter Saket Jajodia

    (@dzire2dzine)

    @ashfame
    Thank you for your reply.

    I just added the code define('COOKIE_DOMAIN', ''); and it seems to be working, lets see for few days if anything goes wrong.

    Great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to login to subsite after changing to custom domain’ is closed to new replies.