[wp-hackers] Virtual Multiblog

Computer Guru computerguru at neosmart.net
Sun Nov 25 17:46:25 GMT 2007


Well, how do you go about upgrading all those sites?

Say you're moving to a new version, and it requires accessing upgrade.php to
update the database schema (like upgrading to 2.3)
You still have to run upgrade.php for each site's DB one-by-one.. (unless
you shell-script a wget command for upgrade.php for all subdomains?)


On 11/25/07, Max <maxbear at gmail.com> wrote:
>
> 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
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Computer Guru
Director,
NeoSmart Technologies
http://neosmart.net/blog/


More information about the wp-hackers mailing list