There are a few things you can do to make sure your power source is working and your phone is charging correctly.

If you check all those things and it still doesn't work, it's possible there's too much debris in your port to make a connection.

Your port can get so dirty that it doesn't work. Small bits of dirt, dust, and lint can be found in a pocket or bag.

The dirt gets deep in the port when you put the cable in. It might stop working when it becomes so dirty.

How to clean your iPhone's charging port

Since you need to see deep into the charging port, you should get a flashlight.

Picture of an iPhone, flashlight, compressed air can, and a toothpick.
You can clean your iPhone's charging port — carefully — with some compressed air and a toothpick.
Dave Johnson/Insider

If you're going to use a toothpick to pull out dirt from the port, you need to use compressed air first.

It's important that you don't attempt to clean the charging port with anything harder than wood. Damage to delicate electronics in the port can be done with a sharp metal pin.

This is the first thing. It's time to power off your phone. You can open the settings app and then shut it down.

There are two The compressed air can only blast air and doesn't expel wet propellent.

There are three. If you can't charge your phone again, turn it on. It is time to try the toothpick if it is still malfunctioning.

Close up picture of an iPhone’s bottom with the Lightning port visible. There is a toothpick resting on top of the phone.
Don't use anything made of metal to clean the port of your phone – a toothpick is the right size, shape, and hardness for the job.
Dave Johnson/Insider

There are four. After your phone is turned off, gently insert the toothpick into the port and lightly remove it from the wall of the port. There are delicate pins in the inside wall that should not be touched. It's important to be gentle because the sides are home to two small spring-mounted anchors that lock onto the charging port when you push the cable in. Its charging days will end if you break anything.

Picture of a toothpick being inserted into the Lightning port of an iPhone.
Be sure not to damage the electronics or mechanical springs inside the port when you swipe it with the toothpick.
Dave Johnson/Insider

There are five. Give the port a burst of compressed air after you've used the toothpick to loosen something.

There are six. Turn the phone off if you push dirt out.

You are back in business if it works. You can either try again or take it to an Apple service center for help.

How to get water out of your iPhone's charging port

If you get a notification that there is water in your phone's charging port, it's a good idea to remove all your accessories and put it on your hand.

The phone should be left in a dry area to dry the port.

It might take up to 24 hours for the port to completely dry, according to Apple. It's tempting to use an external heat source, but don't.