[wp-hackers] Two different servers, one wp install

David Chait davebytes at comcast.net
Wed Aug 18 05:45:38 UTC 2004


> > At the conceptual level, this is exactly what I do right now with
> > CHAITGEAR: my 'test' site is being locally run/hosted, and then I push
> > code/hacks up to my provider for 'releases'.  Content is developed up
> > externally, with a backup script to copy necessary tables back
> > locally.
>
> Ah, in my case, I was just going to use one db, which is considerably
> simpler. I also had grandiose plans to do snapshotting in case the
> database connection wasn't available.

Ahh.  Well, then it depends... Do you want to use one set of TABLES?  If you
want to completely 'share' the database, then the solution is some minor
hacks to 'override' the retrieval of specific options (namely the site name,
URL, etc.) based on being at your internal site.  Again, you pre-detect
which site is really running, set a flag, then can do optional stuff later
on.  This could be changing the table prefix (if sharing DB but not tables),
changing one or two table names (sharing MOST of the database, but maybe
splitting options table, etc. off), or again intercepting the db retrieval
of options values and replacing if on the internal box.

-d





More information about the hackers mailing list