[wp-hackers] How to sync/mirror 2 WP multisite installs using one database?

Mike Little wordpress at zed1.com
Fri May 27 12:27:29 UTC 2011


On Fri, May 27, 2011 at 12:41, Claudio Simeone <mrbrog at gmail.com> wrote:

> 2011/5/27 Dion Hulse (dd32) <wordpress at dd32.id.au>:
>
> > Are they using Subdomains? Sub Directories?, or Mapped domains?
>
> Subdirectories, but a the moment the site is not yet finished.
> I have to transform an existing WP "normal" install to multisite.
>
> > This is all theoretical, I've not had to do it, and I doubt many others
> will
> > have.. the closest i've seen to what you're asking for, is 2 seperate
> > databases, and the posts/terms/taxonomy tables being sync'd accross.. The
> > sites table was different on both servers for their individual
> subdomains.
> > there was some replacing during the sync for the admin subdomain to the
> > public subdomains.. I didn't play with the config, just fix a few plugin
> > issues.. but I do believe they were having constant data sync issues..
>
> It is the solutions I was thinking to: 2 separate databases (and 2
> separate wp installs) and a script that every night syncs the
> front-end with backend, replacing all urls.
> But I was wondering if there is an alternative solution, maybe with
> one single WP install.
>
> Thanks,
>


If the key thing is to split the admin php code onto one machine and the
front end php code onto another, then you should look at apache proxying.

You could have the two different WP installs accessing the same DB (on a
third box), and use apache to proxy to the required URL for one of them.

e.g. have the backend WP instance running on cms.yourdomain.com. It will
generate all content with that domain in the URLs.
Then have your front end instance running apparently on the same domain (
cms.yourdomain.com), but faked in that server's hosts file.
Then have your external url mapped to an apache proxy configuration which
will translate all the external to internal URLs and vice versa.

No database fiddling required.

Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list