ok, is it an internal or external door?
The caterpillar stage is like a 2 week eating binge, they really do nothing but eat and shed their skins rapidly as they grow and grow. The sense the "time" and find what they think is a safe place to hang... they need to hang to develop properly. The skin comes off to reveal the cocoon underneath. This will remain for 2 weeks, until the butterfly emerges. If it is hanging in a place you can safely leave it then please do not disturb it.
Obviously if the dopey thing has decided to hang itself in the middle of a frame that will compromise your house security, then the only thing I can suggest it to take a very thin sharp knife, and try to cut it off as close to the door frame as you possibly can, right up by the paint.. then take it to a branch and fix it on with tape if possible. Many species need to emerge from a hanging position to be able to dry their wings. When you prise it off you will notice a "stem" from which it hangs, like a banana, you could also use that to pin it to a branch.