Question:
Are you saying that the IP address of your switch is not a static IP but an IP that is handed out by DHCP? If so, make it static. (As stated above)

Are you using the web interface that is installed on the switch via the http server or are you using CSPM? If you are using the built in HTTP server Cisco has posted quite a few alerts about the insecurity of this. I gave up on it a long time ago and I manage all of my switches via the CLI over SSH.

If I recall, there was a button in the web interface that would open up a CLI. If you are going to continue using the web interface, you can run commands like wr mem form there.