• Hi all,

    I used to use the following method to do multi-site under wp 2.9 without using any plugin.

    I just replace:

    $table_prefix = 'wp_';

    with:

    $table_prefix = ereg_replace('^(www\.)', '', $_SERVER['HTTP_HOST']);
    $table_prefix = ereg_replace('\.', '', $table_prefix);
    $table_prefix = ereg_replace('\-', '', $table_prefix);
    $table_prefix = $table_prefix . '_';

    I think this method still work under wp 3 (I haven’t test it).

    I build a test site and tried the multi-site and domain mapping plugin. It seems it’s more complicated than the above method. So I just wonder why I need to follow the “official” way, is there any advantage of doing so? Any comments? Thanks.

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Multisite isn’t a plugin, it’s just a feature set of 3.x branch. I would imagine plugins would work better with it, but Im not really Sure i know all the implications of what you’ve done… Basically you’re saying that http://www.domain.com should use tables for domain_com_tablename if I read that right.

    Thread Starter bearvv

    (@bearvv)

    Hi ipstenu,

    You are 100% corrected. Yes, multisite is not a plugin, it’s a new feature of wp 3. If you want to have unique domain, then you need to use domain mapping plugin.

    I am still thinking whether I should follow the “plugin way” or keep on to use my own method. It’s not funny if you got a lot of sites to upgrade.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If your way works, stick by it. I would only switch to normal WordPress for others ability to help if things go wonky 🙂 I mean, no plugin author will want to put much effort into debugging something on that setup.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multisite, without using plugin?’ is closed to new replies.