Update: (July 6th, 2023):
New, Easier, Better Way To Transfer Your WhatsApp to A New Phone.
For Android:
What you need:
1- Android OS Lollipop 5.1, SDK 23 or above, or Android 6 or above installed on both your old and new Android phones.
2- Use the same phone number as your old phone on your new phone.
3- Your new phone must not be registered on WhatsApp until you start the migration on your old phone.
4- Your phones must be close to each other.
5- Both of your phones should be connected to a power source.
6- Both of your phones need to have WiFi enabled. They don’t need to be connected to a network.
7- Certain device permissions are required to initiate the transfer. Precise location permissions are required by the device in Android 12 and below, but WhatsApp does not collect your precise location.
On Old Phone:
1- Open WhatsApp on your old phone.
2- Tap More Options > Settings > Chats > Transfer chats > Start.
3- Accept requested permissions
4- prepare to scan the QR code that will be shown on your new phone.
On New Phone:
1- Download and then open WhatsApp on your new phone.
2- Go through the setup.
3- Tap Accept terms and conditions.
4- Verify your phone number.
5- Tap Start on Transfer chat history from old phone.
6- Accept requested permissions and then you’ll see a QR code.
7- On your old phone scan the QR code shown on your new phone.
8- Accept the invitation.
Notes:
1- While your chat history is transferring, a percentage bar will track the progress.
2- Keep both phones unlocked and don’t leave WhatsApp.
3- Messaging is paused during the chat history transfer.
4- You can Cancel the process at any time.
5- Once the import is complete, tap Done.
For iPhone:
It is similar, and you can get detailed steps for both on the WhatsApp website if you cannot figure it out yourself.
Source: WhatsApp.com
OLD Stuff:
Disclaimer: This is based on my personal experience and it is NOT official. If you like to use it, do it at your own risk.
In addition to all the previous answers, and if WhatsApp ignored the local backup after canceling the google drive backup, one can try this:
When WhatsApp asks for google drive backup:
1- Close WhatsApp.
2- Put the phone on flight mode.
3- Run WhatsApp again.
4- When asks for google drive Skip.
5- Now Local backup should be recognized.
6- Reconnect to the Internet.
7- Go on and restore the local backup.
It is important that you use the same phone number to restore, so either:
1- Change the phone number on the old phone before the backup. or,
2- Use the old phone number to restore then change it on the new phone.