In Dark Souls 2, lighting a bonfire means you can now warp there. For Dark Souls 1 and Dark Souls 2, lighting a bonfire is a separate action than resting at it because you cannot rest when there are phantoms in your world. The mechanics for Dark Souls 1 is unknown, but for Dark Souls 2, there are plenty of times where I invite White Phantoms to explore a difficult area. I light all the bonfires along the way, and then warp back to them once they leave or I die.