What would be the best method to go from Server_old: VB 4.2.5 with php 5.4 to Server_new: VB 5 with php 7.2?

Update first php in old and debug VB 2.5?
Or restore the backup on the new...