You might want to try a different charger, a different charging cable, and a different wall outlet just to make sure that those aren't what's causing the problem. It can also be good to make sure that the charging port of your phone is clean of dirt/lint/etc.