Chosen Solution

It only charges if I hold the 8-pin lightning connector in a certain angle. I have tried changing the 8-pin connector and the charger but the problem doesn’t change. It is getting worse each week. What is the best tutorial or procedure to solve it?

Thanks for helping, Rany, but I think that I didn’t explain it properly. I’ve never replaced any part of the iphone itself so far. When I mentioned “hold the connector in angle” I meant that I have to hold the 8 pin connector and press it slightly up in order to make it work and start charging. I believe that the contact area of the charging port is dirty or any connection is loose inside. Is there any tutorial for solving it?

That’s very strange, unless the issue is something else, such as USB IC (U2). Hope you have a valid back up on your computer or iCloud. If not, back up ASAP, one way or the other. Then my advice would be to take it to a reputed/trusted repair shop and have them look at it, to save you from buying more parts for testing. My guesses: Either the replacement charging dock is defective. That happens a lot. Or you installed it wrong. Or the issue is something else completely, such as your charging and data sync circuit (U2 USB IC as we commonly call it) being defective. The part about charging at an angle puzzles me, otherwise your issue as described (where replacing the charging dock doesn’t solve it) indicates charging circuit slowly giving away in my opinion.