Export/Import content from SilverStripe

551 views
Skip to first unread message

Bob Brown

unread,
Jun 16, 2014, 4:09:49 AM6/16/14
to PHPUG
Hi there,

One of our clients is using SilverStripe and has a requirement to export information from part of the SiteTree from one instance (local staging server) to another instance (production website). Due to their release process they cannot simply have draft changes on the live website.

Can anyone recommend any good approaches to this where we can perhaps export part of the SiteTree (including user permissions) as some kind of interchange format which can then be imported on the target website.

I have searched around for a solution and this is pretty much the same question as this http://www.silverstripe.org/general-questions/show/10146 but there's no good solution to that either.

Thanks in advance,

- Bob -

--
Bob Brown, [L|W]AMP Web Developer
gur...@gmail.com, http://www.guru.net.nz

Robby

unread,
Mar 7, 2016, 4:04:42 PM3/7/16
to NZ PHP Users Group
Plus one. 
I can't find any for now. only site tree import so far.
How other people do content deploy between different environment?

anru chen

unread,
Mar 7, 2016, 4:15:27 PM3/7/16
to NZ PHP Users Group
Hi:

why not just use SQL to extract information?

By the way, if you just want to extract pages ,you can use following code:

Let us assuming , you have a page holder "PageHolder", and under holder, there are some sub pages called SubPage.

1> $holder = DataObject::get_one('PageHolder');
2> $ids = Page::get()->filter(array('ParentID' => $holder->ID))->getIDList();
3> $Children = SubPage::get()->filter(array('ID' => $ids))->limit($limit);

then write customized code to export to what ever format you want.

hope this help.


regards,

anru

--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob

unread,
Mar 8, 2016, 3:28:08 AM3/8/16
to nzp...@googlegroups.com
Not sure if I understand the requirements properly but it might be the workflow module your after?

Or perhaps running a dev task after the deployment to popular content?

Rob

unread,
Mar 8, 2016, 3:35:18 AM3/8/16
to nzp...@googlegroups.com
Errr *populate

Kirk Mayo

unread,
Mar 8, 2016, 2:26:55 PM3/8/16
to NZ PHP Users Group

You might want to take a look at sspak which is a command line tool used for importing exporting assets and the database/SiteTree


https://github.com/silverstripe/sspak

Reply all
Reply to author
Forward
0 new messages