Multi-Domain Plugin & Sub-Directory Multisite Install

Hi there!

With Multi-Networks (they're simple and work fine), comes a demand to Multi-Domain Plugin to work within Sub-Directory Multisite Installs. Why?

Multi-Network is Domain Mapping and child-sites management under multiple domains. This means you can easily "move" any child-site from any child-network to any other without any suffering: they're in the same DB!

So the 2nd Multisite under a Multi-Network gets BlogID 2, and so on (as usual the main Multisite will have BlogID 1). The difference is that Multisites under a Multi-Network don't appear as Child-Sites but as Networks on the Admin Panel.

And the best: each Child-Multisite can have its own Child-Sites branch under its own domain! Then Multi-Newtork would be fantastic!

Please check, this will be my Multi-Network Setup:

.cloud --> main site with Membership, Pro Sites Plan choosing... (BlogID1)
.support --> this will be our support system domain and website (BlogID2)

.me/your-blog/ --> blog customers (BlogID3)
.press/your-site/ --> website customers (BlogID4)
.store/your-store/ --> e-commerce customers (BlogID5)
.academy/your-elearning/ --> e-learning customers (BlogID6)
.training/your-coaching/ --> coaches offering bookings (BlogID7)
.host/your-host/ --> hosting & reseller services (BlogID8)

I would like to use Multi-Domain on my Multi-Network, because my Customers would be able to choose under what domain they want their install to be. But on first line of the usage at Multi-Domain Plugin Page, it says it is NOT compatible with sub-directory Multisites.

The question is that Sub-Domain Multiisite add a huge complexity layer, not only the domain mapping but much more for SSL certificates to work. With a single domain SSL I can guarantee SSL access to all the child-sites under a Network on my Multi-Network if they are using Sub-Directories, but not if they're under a Sub-Domains Multisite Install...

Does it make sense for you?

So, could be possible to add Sub-Directory option to make Multi-Domain to work with them? This would be another awesome feature!

Thank you again for your time, patience and support!

  • Fabio Fava

    Hi Michael, hope you're feeling great today!

    Each domain is under the same Multi-Network Installation. The main domain (.cloud) is the main install so it's the Multisite "Master". All other domains (.me .press etc) will be remaps made by Multi-Network plugin, that's pretty simple and it works.

    That said, I would like to be able to allow my Pro Sites Customers to choose the domain they wish to be under (I suppose this would be made with Multi-Domains). There will be 3 Sites Categories - User, Business, Corporate - depending on the needs.

    The User Funnel Flow should be something like this:

    1 - Gets into main site (.cloud) and chooses a Membership - User, Business or Corporate. This Membership Levels should be attached to the Sites Categories as said;
    2 - Pro Sites (15 Levels) are filtered using Site Categories - User, Business or Corporate;
    3 - Selects one of the 5 levels shown for each of the Categories/Memberships;
    4 - Selects domain under wich he/she wants to be: i.e. --> domain.me/userblog/ for a Blog User or domain.store/userstore/ for an e-Commerce User ... Here is where I woud like Multi Domains to allow that.
    5 - If User wants a Domain & SSL, then a Domain Mapping would be made using the new (idea I had) Namecheap.com API Interface for that;
    6 - Blog is istalled inside the right domain, on the right sub-directory, right domain and SSL mapped to the right places... Then the conversion iss all pretty much done.

    May this be doable integrating all that?

  • Michael

    I'm wanting to basically allow a multi-site network to create their own network.

    I have one main say domain1 with subdomains sub1.domain1

    I have a domain name for sub1 becoming domain2

    I basically want domain2 to allow sub1.domain2 so in essence domain1 and domain2 can have their own network of subdomains and hopefully domains mapped to each. All running from 1 instance of multi-site.

    OR do I need 2 sites to do this and network them together

    I hope that makes sense

  • Fabio Fava

    Well, lets split in parts.

    1) Planning should come always ahead. On Multi-Network, when you create a new Network (that is another Multisite under the same install), then it have a BlogID as any other Child-Blog. BUT... they WON'T appear under "Sites" on Main-Site's Admin Dashboard: They apper ONLY on the Network Admin Dashboard, under "Networks" (that becomes the 1st item on this Dashboard).*

    * If you built a Multi-Network, uninstalling the Multi-Network Plugin (even by mistake), YOUR SUB-NETWORKS WON'T APPEAR ANYWHERE. NO PANIC! You will have to reinstall/reactivate Multi-Network Plugin in order to access your Child-Networks Admins. (read the final note about making it a MU-Plugin).

    2) Multi-Network is intended to map multiple domains (that must have A-Records pointing to the real IP of the WP Main MU Install), if you want them all "under" a Single Multisite Install: with the plugin enabled, it becomes the "Multi-Network" and you can add other "Networks" (Multisites) "under it".

    3) So if you have a Child-Blog under domain1, lets say sub1.domain1, you may be able to create a new "Network" (on Network Admin -> Networks -> Add Network), domain2 (of course the A-Record must point to the same real IP of the Main-Multisite on your cPanel's Domain Control), then you can move the Child-Site from domain1 to domain2, but you probably must have other Child-Blog under domain1: each Network must have at least ONE Child-Blog and CANNOT BE EMPTY.

    4) Open Network Admin -> Networks -> "domain1". On the bottom of the "Edit Network" of "domain1"' Network, you can move the Child-Blog (sub1.domain1) from "Network Sites" (on the right) to "Available Sites" (on the left). Click "Update".

    5) Open "domain2" Network, and move the same Child-Blog from "Available Sites" to "Network Sites" of "domain2". Remember you must have at least another Site under each of your Networks (Multisites).

    6) Then you may erase the Domain Mapping (on the Domain Mapping Plugin) you may have for domain1 and make sure your on your A-Records at cPanel for domain2 are pointing to the same IP on your cPanel Domain Control Panel.

    Multi-Network doesn't need domain mapping: it IS a Domain Mapping & DB-Schema-Sub-Tree-Organizer (couldn't think in a better name>.

    You should take care with DB Optimization Utilities: some may erase the Sub-Networks since they're not associated with a Site (if this happens I don't know to recover, so before you do any DB Cleaning you should ALWAYS do a DB Backup).

    Plugins Garbage Collector seems to be one of those wich erases Sub-Networks from DB. I'll be testing other tools (WP-Optimize and WP-Rocket DB Optimization), and I'll keep this Topic updated as I find any result.

    FINAL NOTE ABOUT MU-PLUGIN -> You can add a folder to MU-Plugins folder (they cannot be disabled or deleted even by Admins and must be installed using either FTP or cPanel's File Manager), using this trick:

    Create a PHP File on your /wp-content/mu-plugins folder (use same name from the plugin file that is wp-multi-network.php), and fill it with the first (commented) lines of the plugin file, plus the "loader line" that just instructs it to load the real file inside the folder. Place the plugin folder inside the same /wp-content/mu-plugins folder, then you won't disable or erase it.

    Below you find the contents for the "loader file" with the Infos of the Plugin and the "loader line":

    <?php

    /**
    * Plugin Name: WP Multi-Network
    * Plugin URI: https://wordpress.org/plugins/wp-multi-network/
    * Description: A Network Management UI for global administrators in WordPress Multisite
    * Version: 1.8.1
    * Author: johnjamesjacoby, ddean, BrianLayman, rmccue
    * Author URI: http://jjj.me
    * Tags: blog, domain, mapping, multisite, network, networks, path, site, subdomain
    * Network: true
    * Text Domain: wp-multi-network
    * Domain Path: /languages
    */

    include 'wp-multi-network/wpmn-loader.php';

    Cheers! (if you find it usefull, give a thumbs up, and maybe some Hero Points (?)...

  • SooBahkDo

    Hello Fabio,

    You seem to have a excellent grasp of this topic, so perhaps you can offer insight about this question.

    CAN A NETWORK OF MULTISITE NETWORKS INCLUDE SUBDOMAIN NETWORKS AND SUBDIRECTORY NETWORKS?
    https://premium.wpmudev.org/forums/topic/can-a-network-of-multisite-networks-include-subdomain-networks-and-subdirectory-networks#post-1259684

    Any clarification will be appreciated.

    Thanks!

  • Fabio Fava

    @ Hi SooBahkDo ! How are you doing today?

    Well, once you decide to use sub-directories on your Multisite, you can actually create Domain Mapping for sub-domains. The only issue is that you will need SSL Certificates for each domain in this case. The option would be to have a Wildcard SSL (wich covers subdomains), but they cost more than a regular SSL (that you can use for sub-directories).

    I do use sub-directories, since I can Domain Map into a sub-domain. Just make sure you have a Wildcard SSL if you plan to use sub-domains, or an individual SSL Certificate for each domain (or sub-domain) you use on your Multisite Install.

    Hope it helps, please let me know if I can further assist you, cheers!

    P.S. - Thank you for the Hero Points!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.