How to Sync an iPhone to a New iTunes Without Losing Songsby Amanda Gronot ; Updated September 28, 2017
When you get a new computer, you don't want to lose all your music on your iPhone. Fortunately, you can easily avoid this problem by transferring your music from your old computer to your new computer. If your music is all purchased from the iTunes Store, you can actually use your iPhone to transfer the music. However, if you have music from CDs or other sources, you will need to transfer that music through a flash drive, or a similar device.
Open iTunes. Click "Store" in the top menu. Select "Authorize Computer." If you are not signed in, click "Sign In," and enter the information for your Apple account. You must authorize your new computer for all the accounts that you have used to make iTunes purchases; this allows you to sync and play these purchases.
Locate the music folder on the hard drive of your old computer. On Windows, this will be "My Music," in "My Documents." On a Mac, this will be "Music," under your username. You can use a hard drive navigation program, such as Explorer or Finder, or you can open "My Computer" on Windows or double-click your hard drive icon on a Mac.
Plug in a flash drive, or a similar device. It will appear as a device in My Computer on Windows, or on your desktop on a Mac. Drag your music folder to the device to make a copy. This may take time if you have many songs.
Plug the flash drive into your new computer. Double-click the device in My Computer or on your desktop to open it; you should see the music folder from your old computer. Open your new computer's hard drive, and locate your "My Music" or "Music" folder for this new computer. Drag the music folder from the flash drive to the music folder on your new computer.
Close and re-open iTunes to ensure all your music appears.
Plug your iPhone into your new computer using the USB cable that came with it.
Choose "Erase and Sync" in the dialog box that appears. This only erases your music and videos, but iTunes will re-sync them immediately from the folder that you just transferred, so no music will be lost.
Connect your iPhone to your new computer using the USB docking cable.
Choose "Transfer Purchases" in the dialog box that appears. Follow the prompts to authorize your computer for the accounts that you used to purchase the music.
Right-click your iPhone's name in the left-side of the iTunes browser if the dialog box does not appear. Select "Transfer Purchases." Follow the prompts to authorize your computer for the appropriate accounts.