Can two cmsB sites share one backend?

By JeffC - February 20, 2015

Hi

I run two websites with news sections. Both of the websites are built with cmsB, two separate licences.

Website One is specialist and publishes original content

Website Two is general interest and publishes original content + duplicate content from Website One

As things stand I am posting a lot of the same content twice. Is there anyway Website Two could pull in data from Website One. I thought maybe moving Website One to a subdomain of Website Two would be the way forward - but not sure if that would work, or how to implement it.

Thanks

Jeff

By Dave - February 21, 2015

Hi Jeffncou, 

Yea, there's a few ways you could do that.  None are especially easy.

The cleanest setup would be to have one CMSB install that had all the data and uploads, just use that for data entry for both sites, and then have viewers on two different domains.  You'd want them on the same server for speed since both would be connecting to the same MYSQL server, and you'd have to either have uploads use absolute urls (some website X could load uploads from the uploads folder of website Y).  Or if they were on the same server you could hard/symbolic link one folder to the other so they both appeared to have the same contents.

Another option would be to create a script that "exports and imports" data between the two sites.  Or maybe you could do a CMSB backup of just that table, and then restore that table on the other site.  But you'd still need to do something to ensure the uploads were linked to thr right place.

We can help through consulting if the client has any budget for it (or if maintaining it by hand is already costing them, automating it might pay for itself).  Or if you want to try it yourself, the best thing to do is just create a test setup with some test domains and experiment there.   eg: beta.websiteone.com and beta.websitetwo.com.

Hope that helps!  Let me know any questions.

Dave Edis - Senior Developer
interactivetools.com

By Jesus - February 25, 2015

Hi Jeffncou,

Sorry for my intrusion, I've been thinking on a similar situation and how about parsing xml?

I was thinking if its possible to create an xml files and then just create a php so we can read it and use it to populate another website. Of course this its just an idea (a very preliminar idea) but I've been thinking about it.

It will be great if we get the idea more concrete from Interactivetools (to see if this its possible at all).

Jesus

By Dave - February 26, 2015

Hi Guys, 

Jeffncou: Be sure to backup first and do some experiments.  You want to make sure that you don't overwrite any files that have been uploaded with the same names when transferring uploads.  Also, upload meta data is stored in a hidden table called "uploads" so you're going to need that data as well.

Jesus: If you could output as XML and then import it remotely that would work too.  Any method of exporting the data, transferring it and re-importing it.  And of course with XML you could do it in real time as well loading the content each time, although that might put extra load on the server.  For an example of creating XML you have a look at the RSS feed in the Code Generator (RSS is a kind of XML).

Dave Edis - Senior Developer
interactivetools.com