{"id":1648665,"date":"2010-08-29T20:23:38","date_gmt":"2010-08-29T20:23:38","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/multisite-without-using-plugin\/"},"modified":"2016-08-19T19:21:57","modified_gmt":"2016-08-19T19:21:57","slug":"multisite-without-using-plugin","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/multisite-without-using-plugin\/","title":{"rendered":"Multisite, without using plugin?"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>I used to use the following method to do multi-site under wp 2.9 without using any plugin.<\/p>\n<p>I just replace:<\/p>\n<p><code>$table_prefix  = &#039;wp_&#039;;<\/code><\/p>\n<p>with:<\/p>\n<pre><code>$table_prefix = ereg_replace(&#039;^(www\\.)&#039;, &#039;&#039;, $_SERVER[&#039;HTTP_HOST&#039;]);\n$table_prefix = ereg_replace(&#039;\\.&#039;, &#039;&#039;, $table_prefix);\n$table_prefix = ereg_replace(&#039;\\-&#039;, &#039;&#039;, $table_prefix);\n$table_prefix = $table_prefix . &#039;_&#039;;<\/code><\/pre>\n<p>I think this method still work under wp 3 (I haven&#8217;t test it).<\/p>\n<p>I build a test site and tried the multi-site and domain mapping plugin. It seems it&#8217;s more complicated than the above method. So I just wonder why I need to follow the &#8220;official&#8221; way, is there any advantage of doing so? Any comments? Thanks.<\/p>\n","protected":false},"template":"","class_list":["post-1648665","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1648665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1648665\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1648665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}