Support » Networking WordPress » Multisite (subdirectory) with multiple domains – SITE & HomeURL

  • Thanks in advance for the help.

    I’m working on migrating a blog, and also setting up new blogs running on AWS (Linux, Apache) multisite sub-directoy install.

    Multisite install is all setup correctly, and functioning, but now we are looking at migrating from running solely on the AWS instance (pointed at it’s own service IP) to using rewrite rules from our primary domain.

    Basically, we have a full site and are redirecting the blog directory is AWS: is using rewrite rules to redirect to the AWS instance (blog id 1) is using rewrite rules to redirect to the AWS instance (blog id 2) points to the AWS instance (blog id 3)

    This works, expect for some issues with Home & Site URL.
    WP_Site remains the AWS server:
    Home URL:
    Site URL:
    wp_blogs/blogID 1
    path: /blogcm/

    This functions, with permalinks, BUT, I needed to update the WP-includes link-template.php, taxonomy.php and author-template.php to reference the SiteURL, instead of the HOME URL (as the home URL will continue to write in the AWS server IP address as opposed to the site location). This isn’t ideal, as for each WordPress update, I will need to update these WP-includes to ensure that the site URL is still referenced (and not the home URL).

    I know that the Create a Network, and Move WordPress both state to use the same Home / SiteURL – but when I do Permalinks stops to function.

    Setting the home and site URL to match (as told) with standard includes files:
    Home URL:
    Site URL:

    Causes the loop to break with 404 page not found for Permalinks (this is really where I’m stuck, and have reverted to modifying WordPress to use SiteURL to fix it). Turning off permalinks, content functions correctly – this is with all plugs disables and the twenty-ten theme.

    I’ve tried to find the documentation on difference in backend reference to Home and SiteURL but can’t find any clarity on what’s causing the Home URL update to break permalinks using the same home/siteURL.

    Permalink configuration:


    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?uploads/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    I can’t find any documentation online of anyone else running WordPress Mulsite Subdirectories with a different HOME and SITEURL so am curious if I’m completely missing something in my configuration, or if it’s unique we’re stacking different servers with the rewrite rules directing /blog/ to AWS & WordPress.

    Thanks for your tim! Let me know if I’m missing details to investigate.

Viewing 1 replies (of 1 total)
  • wpconfig:

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', '' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );'

    Permalink config:
    (need to preserve this for the one blog we’re migrating)

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite (subdirectory) with multiple domains – SITE & HomeURL’ is closed to new replies.