Jump to:

1160 Posts in 2632 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Export Blog Data from 2.4 site to SS3 site [Solved]

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1068 Views
  • Pix
    Avatar
    Community Member
    135 Posts

    Export Blog Data from 2.4 site to SS3 site [Solved] Link to this post

    I'm rebuilding my site from the ground up on SS3, however I need to save my blog! How can I export the blog into the new site? It's mySQL data and actually I've managed to export the entries in SiteTree through phpMyAdmin, but when I import them it is coming across a little funny (no keywords, no author, no publish date) so I am missing something.

    So basically, I just want to migrate just the 2.4 based blog, not the whole site, to a fresh install of SS3. Any help would be GREATLY appreciated!

  • Pix
    Avatar
    Community Member
    135 Posts

    Re: Export Blog Data from 2.4 site to SS3 site [Solved] Link to this post

    I did it! Wooohooooo! I was just missing some tables in the export/import:

    BlogEntry
    BlogEntry_Live
    BlogEntry_versions

    And there it is. Working. You can not fool me SilverStripe. You may make the upgrade process impossible. You may make me cry out in the middle of the night "Why oh why did they change EVERYTHING! Why did they make all the modules obsolete?!?!!" But I shall not stop, I will prevail. I will upgrade!!!!!

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: Export Blog Data from 2.4 site to SS3 site [Solved] Link to this post

    What did you do?
    I need to do the same. ;/

  • Pix
    Avatar
    Community Member
    135 Posts

    Re: Export Blog Data from 2.4 site to SS3 site [Solved] Link to this post

    Wow, it's been awhile...I'm trying to remember....knowing me I did it the hard way :0)

    As I recall, using phpMyAdmin I exported all the tables that had to do with the blog, and then I imported them into the new SS3 site.

    Then, I exported the SiteTree table, but only the blog entries (class = BlogEntry). However, there are a couple of fields (such as ToDo and Priority) that are in the 2.4 SiteTree that are not in the SS3 SiteTree, so I got rid of all of those. Basically, I made it look exactly the same as the fields in the SS3 SiteTree, and then I imported. Does that make sense?

    Actually, I am going to be doing it again here soon shortly, so if I miss anything I wil post again.

  • Pix
    Avatar
    Community Member
    135 Posts

    Re: Export Blog Data from 2.4 site to SS3 site [Solved] Link to this post

    OK, I just did this again works like a charm. Here's what I did, using phpMyAdmin:

    1) Make a copy of existing 2.4 database (you really only need these tables: sitetree, sitetree_live, blogentry, blogentry_live).
    2) With your database copy, you delete the following fields from sitetree and sitetree_live: ToDo, Priority, Status, HomepageForDomain
    3) Export the records with class name 'BlogEntry' from sitetree and sitetree_live. Also, export the blogentry, blogentry_live tables.
    4) import them into your SS3 site!

    A few things to note: you will probably need to change the 'ParentID' value of the BlogEntry records to match the ID of your BlogHolder page unless coincidentally they match, otherwise the blog entries won't show in CMS or on site! Also, upon importing into your new site, you may run into a Primary Key conflict if there are pages already existing with the same ID as something you are trying to import. In that case, all you need to do is change the ID of the record you are trying to import to something unique.

    Hope that helps.

    1068 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.