Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Merging two sites into one install using Multisite module


Go to End


3 Posts   1218 Views

Avatar
ccburns

Community Member, 79 Posts

20 September 2015 at 11:16pm

Hi Guys,

At the moment I am trying to merge two established and relatively large websites into a single install. The website in question has an Australian site and a New Zealand site. Different products and contend need to be displayed on each site.

I've been able to successfully set up the multisite module. The initial /dev/build/ modifies the database for correctly sets up the default site.

My problem is that the second site is quite large so I don't want to have to replicate the site manually. Does anyone know of an import script that can import the SiteTree from one Silverstripe site into another site? I can't just directly import data from the database as the ID's overlap because both sites started at ID = 1.

After googling for a bit I'm thinking of writing module that will export the sitetree as a tabbed file and use the sitetreeimporter module (I assume I'll need to modify the code a bit to cater for the changed DB structure that the multisite module introduces.

If anyone else has some precanned scripts or advice I would appreciate it.

Cheers,
Colin

Avatar
Marcus

Administrator, 89 Posts

21 September 2015 at 4:34pm

I've used the silverstripe-connector with the external-content module to do these kinds of imports before, though it does rely on the same page/dataobject types existing in both systems. Otherwise, a data dump / re-import from CSV is likely your best bet, unless you want to get down and dirty with re-writing SQL dumps :)

Avatar
ccburns

Community Member, 79 Posts

21 September 2015 at 4:43pm

Thanks Marcus, I've used the Wordpress connector before on a site so I'll see if I can get that to work.

Cheers,
Colin