The following in stolen from: http://www.whatimade.today/esp8266-easiest-way-to-program-so-far/
- Download the Arduino IDE.
- Go to File –> Preferences and add the link
http://arduino.esp8266.com/stable/package_esp8266com_index.jsonto the Additional Boards Manager URLS.
- Go to Tools –> Board –> Boards manager
- You should now have the esp8266 as an option there since you’ve added it to the Additional Boards. Select it and press Install
- Wait for it…
- Now, You have the ESP8266 boards configure. Choose the board you have, “Generic ESP8266 Module” if you got the regular module
- Choose the ESP8266 port and you’re done!