One way to do this is in your Wifi router. I have a D-Link router, and in the setup I go to Setup / Network settings / DHCP reservation. I can then ask the router to give a given MAC address a fixed IP address.
Alternatively, the ESP can request a certain IP address from the router. The command will depend on which firmware you're running.
SSID = "YOUR SSID"
PW = "YOUR SSID PASSWORD"
IPADR = "192.168.0.126" //Requested static IP address for the ESP
IPROUTER = "192.168.0.1" // IP address for the Wifi router