• Hi. I’m trying to access a multisite database outside wordpress, loading wp-config.php and wp-load.php. For doing so, I use include_once(path/wp-load.php), where the path was correctly defined. The method worked for a standard wordpress installation, so I know it is not a syntax error, but in multisite redirects automatically to the multisite main page.

    I’m using a shared hosting account and the multisite wordpress is locaded in a folder. The main directory contains another wordpress “singlesite”, so the multisite wp-load file is something like root/folder/wp-load.php.

    Can somebody explain why the redirects? I’ve tried this methond for another multisite, installed on a dedicated server, and worked like a charm. What can I do? Thank you in advance.

Viewing 1 replies (of 1 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Because Multisite is properly trying to sort out what site you’re trying to call and since it can’t figure it out, punts you to main.

    IIRC if you set HTTP_HOST explicetly it’ll work.

    $_SERVER[ 'HTTP_HOST' ] = 'www.yourdomain.com';

Viewing 1 replies (of 1 total)

The topic ‘externally connect to multisite generates redirect’ is closed to new replies.