Question: how to transfer the data from old iphone to new phone?
Answer: Open Settings on your old iPhone.
Tap the Apple ID banner.
Tap iCloud. Source: iMore.
Tap iCloud Backup.
Tap Back Up Now. ... 
Turn your old iPhone off once the backup is finished.
Remove the SIM card from your old iPhone or if you're going to move it to your new one.