Updating SilverStripe 2.4.13 Installations

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 2.4.13

Upgrade to SS 4

I have 2 old installations of SS 2.4.13 which need to be migrated to SS 4.
Is there an upgrade path from 2.4.13 to current Version 4? If so, could you please reference the doc, I didn’t find anything.

I was looking for migration instructions from 2.4.13 to 3.x but did not find any docs either. If I need to update to 3.x first, could someone please provide a hint where the docs can be found?


Hi, I’ve done some migrations from 2.4 to SS4 and did that in more smaller steps.

Depending on the data you need to keep it might be easier to set it up as a new site and copy over the data manually. Mainly if it’s “just” a normal website with a bunch of pages. If you have more complicated data structures and business logic, an upgrade is doable.

This is how I upgraded a site with subsites module and some custom code to SS4 with keeping all data in the database:

First I upgraded to SS3 or SS3.1 level by using sunnysideup’s upgrader. This does a good job in general and leaves you with a bunch of comments in your code you need to fix yourself. Mainly manual conversion from DataObjectManager to the new GridField. Nothing too complicated but manual work.

The other bigger improvement of SS3 was composer support. I hope for you that you don’t have custom code mixed in the installed 3rd party modules. If yes, you need somehow find out what changed and if you still need it. You might still be able to download the original modules somewhere and create a diff to your code. For switching to composer you need to remove all modules and install them again with composer. This should be pretty straight forward. Some modules don’t have a good replacement or have breaking changes. This is always a major pain. I’m always doing a research of used modules and new available versions before starting upgrading.

Next I fixed the templates. In SS2 you only have <% control $Foo %>, for both looping over a list or using a single object. This cannot be automatically be done, cause that simple upgrader tools don’t know if you need a <% loop %> or a <% with %>. The old syntax still works in SS3 but will break in SS4, so better fix it right now. TBH I actually found that out after I upgraded to SS4 when the templates suddenly broke.

While on SS3 I’d update to the latest SS3 version and check for deprecations in the code. My favourite IDE does a good job on analysing/inspecting my custom code. It’s easier for me to fix calls to deprecated methods while I can still see the replacement in the code. When I’m on SS4, the code is just not working and I need to read throught the changelogs.

And then it’s finally time to upgrade to SS4, which is well documented. The official Silverstripe upgrader tool does a very good job on this. You might research if all modules are still available on SS4 or if there are replacements. Maybe you need to write something to migrate the data. This depends on your project.

If you have used Translatable for multi-language in SS2 you need to change to fluent. I might be able to help you migrating the data if you get stuck.

1 Like

Thank you very much for your guidiance, wmk.
I have a lot of individual coding in one of the implementations including member management, birthday and jubilee lists and a lot more for a non profit organization all build on DataObjectManager.

Your advise is very precious since I do have a feeling now what to do. Wondering why I did not find any docs about SS2 -> SS3 Migration in the web any more…

I used Translatable for multi-language also, even right now I am using one language only.

Thanks for your offer to help. I am afraid I might need it :slight_smile:

Thanks again