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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SQL Migration Documentation

Go to End

3 Posts   997 Views

Ben Gribaudo

Community Member, 181 Posts

16 April 2009 at 4:11am


We have a mid-sized site we'd like to migrate from a home-grown CMS to SS. It might save some effort if we could automate the bulk of this migration. One way to do this would using SQL to insert pages in SS's database. Is there any documentation out there on how to do this (such as "how to create new SS pages via SQL")?



Forum Moderator, 5523 Posts

16 April 2009 at 8:45pm

To create a page in the cms have alook at the 'SiteTree' and 'SiteTree_Live' tables.

I think you would be able to get it to work by doing something like 'INSERT INTO SiteTree (Title, Content, URLSegment, ParentID....) VALUES ('My Page', 'My Content', 'page-url', 0)

It would involve just a bit of trial and error and playing round :). I think you will be able to just insert into sitetree and then run publish/all rather then insert into 2 tables.

Also another way that might be useful is andy has developed a static importer for one of our clients sites, imports a couple thousand pages from a think a CSV file export of their database. You might like to check out the code for that -

Ben Gribaudo

Community Member, 181 Posts

17 April 2009 at 3:18am

Thanks for these pointers, Will!