Make sure your phone us turned off, and using an alcohol swab or q-tip and isopropyl alcohol gently clean inside the charging port. Typically debris will come out either black or a dark color on the q-tip, and you will know if it needed cleaned. If it is not dirty, then it is the battery or the charging port that will need to be replaced.