• (Hi awesome support team!)

    All the documentation everywhere (including Mika’s venerable Multisite 101) says that setting multisite up when WP lives in its own directory should Just Work. Unfortunately, I’m not having much luck with that.

    Before setting up the network: My site lives at https://example.com/ and WP at https://example.com/wp/. These are set in General Settings.

    Setting up the network: I head over to Tools > Network Setup. I pick subdomain install. WP generates the following config for me:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'vagrant.local');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    Post-setup: I can log in to the main site’s admin, but all network links point erroneously to /wp-admin/network/... rather than /wp/wp-admin/network/... (well, not all, but #26349 should fix that).

    Am I missing a step here? All the docs seem to indicate that it works without any further modification.

    I’ve also tried editing the PATH_CURRENT_SITE definition to /wp/, but that seems to just break more things. ??

    (Now, a guess as to why it breaks: both network_site_url() and network_home_url() use $current_site->domain . $current_site->path, so seem to assume that it’s not set up in its own directory. Whether this is a bug introduced post-3.5, I’m not sure, but it looks like it shouldn’t work based on the code, and it doesn’t.)

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

    (@ipstenu)

    ?????? Advisor and Activist

    *headscratch*

    Okay… So I just did it locally and everything’s fine.

    wp-config = do not put in /wp/ (as you saw)

    index = Yes, add in /wp/

    What’s in your .htaccess? Mine’s

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) blog/$1 [L]
    RewriteRule ^(.*\.php)$ blog/$1 [L]
    RewriteRule . index.php [L]
Viewing 1 replies (of 1 total)
  • The topic ‘Setting up multsite with WP in its own directory’ is closed to new replies.