Connecting ESP8266 to Arduino Uno
Software serial doesn't work reliably at 115200. You need to use a lower baud rate:


Connect the ESP8266 back to your serial USB to TTL setup.
Send the following command to reconfigure the ESP8266 to do AT communication at 9600 baud: AT+UART_DEF=9600,8,1,0,3
Change line 9 of your sketch to esp8266.begin(9600);. This will cause the Uno to communicate with the ESP8266 at 9600 baud.
Upload the revised sketch to your Uno and connect it back up to the ESP8266.