How do I restore WhatsApp messages?

How to save your current WhatsApp message history
Before restoring your old message history, you must save your current message history, otherwise it will be lost. Note, however, that this action will overwrite the most recent backup made by WhatsApp. Proceed as follows:

Open WhatsApp and click the menu button in the upper right corner.
In Settings, select Chats > Chat Backup.
The “Save” button creates the current backup.
Restore WhatsApp messages: – Up to 7 days
With the automatic WhatsApp backup file, only messages sent no earlier than 7 days ago can be restored. How to restore messages:

First, install File Manager from Google Play, such as ES File Explorer or File Manager.
In File Manager, go to the “local WhatsApp/Databases” path and find the file “msgstore.db.crypt”.
This is the latest backup of WhatsApp. Rename the file to “msgstore.db.cryptXX”
Now delete WhatsApp and run the “/local/WhatsApp/Databases/” path again through File Manager.
Older backups are saved as msgstore -YYYYY-MM-DD.1.db.crypt. Find the backup you want and rename the file to msgstore.db.crypt.
If you download WhatsApp for Android again, you will be prompted to back it up after launching it. Confirm the process and then the required backup will be written.