There is a post that asks this question but with no continuation.
I want to load a sketch that drives 2 DC motors on to the Arduino UNO compatible board using the USB connection, then repair and modify the sketch through the WiFi module ESP8266
Or do i have to buy the Arduino WiFly shield with the RN131C and SC16IS750 chips
It is possible and there’s probably more than one way to do this but you might check out the HackADay article below to get an idea of what you would need to setup to make it work with ESP8266.
Unfortunately we do not carry the WiFly Shield anymore, I don’t even know if all the parts needed to make one are available anymore. Searching online for “program arduino uno via wifi” might yield some other possible solutions for you.