You can transfer your WhatsApp data to a new phone by restoring from Google Drive or a local backup.
Restore from a Google Drive backup
In order to successfully restore a Google Drive backup, you need to use the same phone number and Google account used to create the backup.
To restore your backup:
Uninstall and reinstall WhatsApp.
Open WhatsApp and verify your number.
When prompted, tap RESTORE to restore your chats and media from Google Drive.
After the restoration process is complete, tap NEXT. Your chats will be displayed once initialization is complete.
WhatsApp will begin restoring your media files after your chats are restored.
If you install WhatsApp without any prior backups from Google Drive, WhatsApp will automatically restore from your local backup file.
Restore from a local backup
If you want to use a local backup, you'll need to transfer the files to the new phone using a computer, file explorer or SD Card.
Your phone will store up to the last seven days worth of local backup files.
Local backups will be automatically created every day at 2:00 AM and saved as a file in your phone.
If your data isn't stored in the /sdcard/WhatsApp/ folder, you might see "internal storage" or "main storage" folders.
Restore a less recent local backup
If you want to restore a local backup that isn't the most recent one, you'll need to do the following:
Download a file manager app.
In the file manager app, navigate to sdcard/WhatsApp/Databases. If your data isn't stored on the SD card, you might see "internal storage" or "main storage" instead of sdcard.
Rename the backup file you want to restore from msgstore-YYYY-MM-DD.1.db.crypt12 to msgstore.db.crypt12. It's possible that an earlier backup might be on an earlier protocol, such as crypt9 or crypt10. Don't change the number of the crypt extension.