Sponsor for just $1/mo and receive access to our private Discord server!

Slick­Stack
Lightning-fast WordPress on Nginx

WP Multisite redirect loop

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #3752 Reply
    Richard
    Guest

    Has anyone been able to set up using the Multisite function enabled?

    I had CF set up to Full SSL but still get a redirect loop when trying to visit /wp-login.php on two tries (using two different domains, one I bought brand new because the other has HSTS pre-enabled to phase out that problem). Adminer works just fine though, so there’s handshakes with the server but just something wrong with the WordPress connection.

    #3753 Reply
    Kimberly
    Guest

    Tracing the problem down to define(‘NOBLOGREDIRECT’, in wp-config, with the no blog pointing to http://www.tld.com where there is no site defined during installation (I did update to include it in ss-config afterward but it doesn’t seems to update the site). I’ll try another fresh installation with www included in the site name to see if that fixes it; this probably should be highlighted more in the wizard…

    #3755 Reply
    Isabella
    Guest

    I think you need to run Tools >> Network Setup first in your WP Admin if this is a new install?

    #3766 Reply
    Stephanie
    Guest
    #3767 Reply
    Roy
    Guest

    I think you need to run Tools >> Network Setup first in your WP Admin if this is a new install?

    This.

    The problem is that WordPress doesn’t have any way to programmatically to activate Multisite in the database, so for SlickStack you have to comment out the Multisite constants in your wp-config.php and then run the Tools >> Network setup first.

    After that, uncomment those constants in wp-config.php and you are good to go.

    We probably need to find a way to emulate the WP-CLI commands:

    wp core multisite-install

    wp core multisite-convert

    #3774 Reply
    Stephen
    Guest
    /** comment these out on new installs and visit WP Admin >> Tools >> Network Setup */
    define('MULTISITE', true); // ss = true
    define('SUBDOMAIN_INSTALL', @WP_MULTISITE_SUBDOMAINS); // ss = true
    // define('DOMAIN_CURRENT_SITE', '@SITE_DOMAIN'); // ss = *must be unique*
    define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);
    define('NOBLOGREDIRECT', 'https://@SITE_DOMAIN'); // ss = *must be unique*
    define('PATH_CURRENT_SITE', '/'); // ss = /
    define('SITE_ID_CURRENT_SITE', 1); // ss = 1
    define('BLOG_ID_CURRENT_SITE', 1); // ss = 1

    source:
    https://github.com/littlebizzy/slickstack/blob/master/modules/wordpress/wp-config-multisite.txt

    #3861 Reply
    Isabella
    Guest

    Also be sure you don’t have Cloudflare flexible SSL enabled, it should be Full SSL only when using SlickStack since it’s HSTS

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: WP Multisite redirect loop
Last modified on January 16, 2023