Like Roger Jones commented: You don't need to store the wifi password as plain text. It's best practice to store it as encrypted pre-shared key. Your conf file
/etc/wpa_supplicant/wpa_supplicant.conf should look like this:
wpa_passphrase "YourSSID" in a terminal and you should be asked for the password. Enter it and copy the encrypted PSK (it looks like gibberish, i.e.
Then open the conf file in an editor, i.e.:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
To play it safe:
Uncomment the psk line:
Insert a new line:
Save the conf file and reboot.
If your wifi connection still works fine, edit the conf file again and delete the line with the commented plain text password. Save the conf file and done!