After a network configuration reset on my iPhone all Wi-Fi passwords were lost. They were stored in iCloud Keychain, synced with my Mac, where they disappeared too. This is very frustrating since it seems that they were store only on iCloud and I can't restore them via old Time Machine backups. (In Keychain on my Mac I have only some of them, 90% are lost.)
I came across this question and this was suggested by someone on a forum:
- Disable iCloud Keychain from the iCloud settings page (On the top of settings if running iOS 10.3, down the list if running other versions of iOS)
- Do the "Reset network settings" to debug the network issue you're experiencing
- All the Wi-Fi passwords should now be deleted. What you now have to do is to connect to a network manually, then re enabling your iCloud Keychain, your old WiFi passwords should have resynced and you should now have access to all previously connected WiFis.
Note that I haven't tested this personally, but I just came across this because I'm trying to debug a problem when my iPad disconnects from WiFi only when streaming Netflix.
Are you using an Airport base? If so, you can force the password to be added back to your keychain from there (assuming it is in the airport base settings).
Go to Airport Utility/Edit/Wireless in this tab the name of your WiFi should be mentioned, with the password typed but not visible. If not selected yet, then tick the box for "Remember this password in may keychain", then it should save an item in you keychain again and your mac reconnecting automatically to this WiFi