Image credit:
How to Recover a Lost WiFi Password from ES File Explorer File Manager
For this also your mobile phone should be rooted and download an application called ES File Explorer File Manager. Open Device storage in ES File Explorer. There will be a folder named Data, open it. Then there will be a folder named Misc, open it. Then open the WiFi folder. There will be a file named wpa_suppicant.cofig inside the WiFi folder, open it with ES File Explorer. Now you will get some codes in front of these codes will be written as ssid. The name in front of this ssid is your WiFi name and psk will be written below it and the name in front of it will be your WiFi password. If none of the solutions work, you may need to reset the router. Do not do this unless you are able to connect any devices to the network. Resetting the router is the last option, as you will need to reset the entire network to restore your internet connection. If you are not aware of this, we suggest that you contact your Internet Service Provider.