Upgrade numbering with upgrade.php shows error page

I just tried to upgrade the numbering of a kirby 2 content structure.
I added the upgrade script to my root folder and now im trying to run it. But just shows my error page. Do I have to add a route or something similar? I can’t find anything in the docs.

How can I run this script successfully?

Thanks for your help.

No, it doesn’t require any routes, just that script in the root folder of your project, with the Kirby 2 kirby and panel folders already replaced with the new kirby folder. And PHP 7.1+

Strange… Yes, I have I working Kirby3 installation.
As a workaround I pasted the line

Kirby\Cms\System::upgradeContent(__DIR__ . '/content');

right after the include of bootstrap all my sorting numbers are no correct.

So not a very nice solution, but it works.