Multisite installation in /blog/ directory (4 posts)

  1. dazza041
    Posted 2 years ago #


    This is just a query but has anyone had an issue, or seen, how to configure WP with Multisite where wordpress lives in a sub directory.

    The problem I am facing is this:

    WP Installed > domain.com/blog
    WP Homepage > domain.com/news/all-news

    However, if I install multisite and create a new site the admin section links become:

    - rather than the expected -

    Does anyone have any recommendations?

    The config file is:
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'domain.com');
    define('PATH_CURRENT_SITE', '/news/all-news/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    .htaccess is here:
    RewriteEngine On
    RewriteBase /news/all-news/
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) /domain.com/blog/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /domain.com/blog/$2 [L]
    RewriteRule . index.php [L]

    Any ideas would be greatly appreciated! It has had me stumped for the past few hours.

  2. define('PATH_CURRENT_SITE', '/news/all-news/');


    RewriteBase /news/all-news/

    That's why.

    WP is installed in /news/all-news/

  3. dazza041
    Posted 2 years ago #

    WP is installed in '/blog/'

    A CMS that is in use pulls wordpress content out and their default pages are '/news/all-news/'.

  4. define('PATH_CURRENT_SITE', '/news/all-news/');

    That's telling WP 'My files are in /news/all-news/'

    So is RewriteBase /news/all-news/

    I don't see /blog/ mentioned at ALL in your wp-config or htaccess until you get to /domain.com/blog/ which isn't right by the way, so really, you've told WP that your files are there, and it's behaving as expected.

    How did you come up with these settings?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.