[wp-hackers] Virtual Multiblog

Max maxbear at gmail.com
Sun Nov 25 16:29:41 GMT 2007


You can just replace the following code in your wp-config.php

// You can have multiple installations in one database if you give
each a unique prefix
//$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
$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 hosted over 100 wp sites with 1 installation only. No problem at all.

Forget those mass installation script. I can't imagine how you do the
upgrade or add plugin if you have mroe than 100 sites.

Max

On Nov 25, 2007 3:19 PM, Jeremy Visser <jeremy.visser at gmail.com> wrote:
> On Thu, 2007-11-22 at 21:09 -0600, Stephen Rider wrote:
> > This is different than MU in that:
> >
> > 1) Each blog acts as a completely separate install -- separate admin,
> > users, etc.
> > 2) NO known incompatibilities with any plugins or themes.
>
> Sorry, I haven't looked at your code yet, but how is this different from
> doing something like this in wp-config.php...?
>
> > $table_prefix = 'wp_' . $_SERVER['HTTP_HOST'] . '_';
>
> I guess if you wanted to use the same host, but different
> subdirectories, you'd run into problems, but something equivalent almost
> as simple could be worked out for sure.
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list