Silverstripe Version:
3.0.5 not installed with composer.
Question:
I have been asked to upgrade a fairly old SS site to one compatible with PHP 7.3, I am NOT an SS user. I have read lots of documentation but am not really getting anywhere. I have tried upgrade-code.phar, but it doesn’t like the setup, I installed composer but it says I have to fix conflicts but it doesn’t say what they are. Any assistance would be much appreciated.
You’d need to go from 3.0 to at least 3.7 to get PHP 7 compatibility and that can get pretty messy. I don’t think Silverstripe CMS had adopted SemVer yet back in 3.0 days, so you may encounter breaking changes and need to rewrite code. It’s probably going to be quite a big and frustrating job, and it’s hard to know where to begin when offering support on a forum for something like this which may be why you haven’t had a response yet. To be honest I would recommend outsourcing this work to an experienced SS dev, then you could maintain it once it’s in a modern and manageable state. You can find a list of SS devs and businesses here if you’re interested:
Looking at this site’s content, I am actually surprised it was implemented using a CMS in the first place. I doubt whether there is any custom code. I am wondering whether I can simply install a more recent release over the top of what is there.
Want to post a screenshot of the root directory? That will show what additional modules may be installed (if any). User code is in a folder named ‘mysite’ by default, but it may have been renamed to describe the project. If there isn’t any custom code in there then sure, you could try installing SS3.7 fresh, replace the assets folder with the one from your project, import the database in to that new project, build and see what happens!
That looks like a super basic site. I would just do a clean install of SS3.7 and copy over the assets, themes and mysite folders and DB. You might need to do some light changes to the files in your mysite folder but probably not much.
Are you doing this on a live server? Generally it’s better to do this kind of work locally first if possible, then push up when ready. This might help to find the error log: https://stackoverflow.com/a/5127884/2494302
Did you do a dev/build? Sorry, some things are so ingrained in SS development that I forget to mention them . After changing your code (or database in this case) you generally need to either visit ‘mysite.com/dev/build’ to flush all caches/manifests and build the database, or append ?flush to any URL on your site to just flush the manifests. You’d definitely need to do a build after importing a SS3.0 database in to a SS3.7 site.
That seems to have fixed things -)
We host, Drupal, Joomla, WP, SS, etc etc and I am no expert in any of them but in most cases I know more than the end user. We are trying turn off PHP 5 and I have customers who really have no clue at all.
Thanks very much for your patience and assistance. Hopefully we are all done now.