Recently I adopted a Kirby v2 installation. Now I am wondering of the best way to migrate this dinosaur to a current Kirby installation.
There seems to be not much magic in the old site, e. g. no plugins. But I am completely new to Kirby and therefore cannot identify all the stuff going on there.
I made a test balloon with installing the current Kirby version to a new subdomain, which is finally working.
On a different subdomain I tried upgrading a copy of the old site to the new version, which failed.
So, it seems to be easier to set up Kirby from scratch. Is there a way to migrate the contents?
Any other recommendations?
I think if you follow the upgrade guide from Kirby 2 to 3 (Update to Kirby 3 | Kirby CMS ), that should already fix a lot of the issues.
Then from there, I’d go by error messages.
I’ve done this, but it ended up in an error message that seems to be fundamental.
So I don’t know how long/easy the road is, to proceed from there:
[10-Aug-2025 18:38:58 UTC] Whoops\Exception\ErrorException: foreach() argument must be of type array|object, null given in /homepages/31/d321458458/htdocs/next/site/snippets/menu.php:4
Stack trace:
#0 /homepages/31/d321458458/htdocs/next/site/snippets/menu.php(4): Whoops\Run->handleError()
#1 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(430): include(‘/homepages/31/d…’)
#2 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(370): Kirby\Filesystem\F::loadIsolated()
#3 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(376): Kirby\Filesystem\F::Kirby\Filesystem{closure}()
#4 /homepages/31/d321458458/htdocs/next/kirby/src/Toolkit/Tpl.php(35): Kirby\Filesystem\F::load()
#5 /homepages/31/d321458458/htdocs/next/kirby/src/Template/Snippet.php(174): Kirby\Toolkit\Tpl::load()
#6 /homepages/31/d321458458/htdocs/next/kirby/config/components.php(312): Kirby\Template\Snippet::factory()
#7 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/App.php(1601): Kirby\Cms\Core->{closure}()
#8 /homepages/31/d321458458/htdocs/next/kirby/config/helpers.php(533): Kirby\Cms\App->snippet()
#9 /homepages/31/d321458458/htdocs/next/site/snippets/header.php(36): snippet()
#10 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(430): include(‘/homepages/31/d…’)
#11 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(370): Kirby\Filesystem\F::loadIsolated()
#12 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(376): Kirby\Filesystem\F::Kirby\Filesystem{closure}()
#13 /homepages/31/d321458458/htdocs/next/kirby/src/Toolkit/Tpl.php(35): Kirby\Filesystem\F::load()
#14 /homepages/31/d321458458/htdocs/next/kirby/src/Template/Snippet.php(174): Kirby\Toolkit\Tpl::load()
#15 /homepages/31/d321458458/htdocs/next/kirby/config/components.php(312): Kirby\Template\Snippet::factory()
#16 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/App.php(1601): Kirby\Cms\Core->{closure}()
#17 /homepages/31/d321458458/htdocs/next/kirby/config/helpers.php(533): Kirby\Cms\App->snippet()
#18 /homepages/31/d321458458/htdocs/next/site/templates/default.php(1): snippet()
#19 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(430): include(‘/homepages/31/d…’)
#20 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(370): Kirby\Filesystem\F::loadIsolated()
#21 /homepages/31/d321458458/htdocs/next/kirby/src/Filesystem/F.php(376): Kirby\Filesystem\F::Kirby\Filesystem{closure}()
#22 /homepages/31/d321458458/htdocs/next/kirby/src/Toolkit/Tpl.php(35): Kirby\Filesystem\F::load()
#23 /homepages/31/d321458458/htdocs/next/kirby/src/Template/Template.php(164): Kirby\Toolkit\Tpl::load()
#24 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/Page.php(974): Kirby\Template\Template->render()
#25 /homepages/31/d321458458/htdocs/next/kirby/src/Content/VersionId.php(106): Kirby\Cms\Page->Kirby\Cms{closure}()
#26 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/Page.php(952): Kirby\Content\VersionId::render()
#27 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/App.php(743): Kirby\Cms\Page->render()
#28 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/App.php(758): Kirby\Cms\App->io()
#29 /homepages/31/d321458458/htdocs/next/kirby/src/Cms/App.php(1195): Kirby\Cms\App->io()
#30 /homepages/31/d321458458/htdocs/next/index.php(5): Kirby\Cms\App->render()
#31 {main}
nsk7even:
site/snippets/menu.php:4
The error points you to this file at line 4. what’s the code there?