I tried to upodate an old version to the newest one. The problem is, that i have to run php 8.2. the old versiondo not support this. I tried to install the newest version at the same server in an other folder. But after I copied the old config and data to the new installion it tries to downgrade the installation.
I am using a server from domainfactory
Your description doesn’t make sense. If you have an old installation it must be running older PHP… Start there and upgrade the system one version at time until you reach a state where you can update PHP to more modern version and continue upgrading to last NC version. depending on you versions multiple iterations may be required.
As you already have noticed yourself, you can’t bypass the “upgrade one major version at a time” requirement by copying the old data folder to a new installation.
As @wwe said: Downgrade PHP to the latest version that is still supported by your current Nextcloud version → Upgrade Nextcloud, one major version at a time, to the latest version that still supports the PHP version you downgraded to → Upgrade PHP to the latest version that is still supported by the Nextcloud Version you upgraded to. → Upgrade Nextcloud, one major version at a time… → Upgrade PHP… etc… etc… until you reach PHP8.2 and NC 26.