Problem uploading Sketch (Arduino Uno r3 and esp8266)

Hello,
right now I have a problem connecting the Uno R3 with the esp8266

I am using a LCD and a DHT11 humidity sensor and its working fine. But when I connect the esp8266 I can`t upload the code.
I will receive this error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x28
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x28

I looked through a lot of posts here but I don't know which one helps me. I tried using another USB port, reinstalling the IDE, changed my RX and TX using SoftwareSerial but nothing helps.

I hope you can help me

PS: This is how the esp is connected:

Disconnect the ESP from RX and TX when trying to upload.

If you're using RX and TX, you do not have a need for software serial. RX and TX are the hardware serial port so you just as well can use Serial.

sterretje:
Disconnect the ESP from RX and TX when trying to upload.

If you're using RX and TX, you do not have a need for software serial. RX and TX are the hardware serial port so you just as well can use Serial.

Removed the cables but still the same error. Any other ideas?

Did you select the correct board?
2)
Is the board recognised in Windows Device Manager (or Linux/Mac equivalents)?
3)
Did you select the correct port? See (2).

sterretje:
1)
Did you select the correct board?
2)
Is the board recognised in Windows Device Manager (or Linux/Mac equivalents)?
3)
Did you select the correct port? See (2).

Yes, yes and yes. Sketches without the esp are working fine but when I connect the esp with the arduino I receive the error

But I told you to disconnect the ESP and after that you said it still did not work? I'm a little confused.

Anything connected to pins 0 and 1 on an Uno can interfere with the upload.

sterretje:
But I told you to disconnect the ESP and after that you said it still did not work? I'm a little confused.

Anything connected to pins 0 and 1 on an Uno can interfere with the upload.

I removed it from TX and RX but it was still connected to 3,3v gnd and reset ... if I remove this too the code will work ... but I need WiFi to send data to a database

Connect it again after the upload.

The 3.3V from the Arduino might not be able to deliver enough power for the ESP.

sterretje:
Connect it again after the upload.

The 3.3V from the Arduino might not be able to deliver enough power for the ESP.

Ok so after uploading I connect the esp8266 and the red lamp on the esp is on. When I type DT on the serial monitor I receive OK. Does this mean, that its working?

I have no idea; never used an ESP. You aso haven't shown your sketch (if you have one).

Using RX and TX for ESP and at the same time using USB usually does not work; you might have to go back to SoftwareSerial.

sterretje:
I have no idea; never used an ESP. You aso haven't shown your sketch (if you have one).

Using RX and TX for ESP and at the same time using USB usually does not work; you might have to go back to SoftwareSerial.

Okay but I can connect to my Wifi so many thanks to you and merry christmas