The high traffic area around a door frame is more susceptible to premature wear and tear than other areas. Wear and tear includes small rips that can begin in the edge of the door frame and work out into the room. Because the rip can spread further if you continue to walk over it, fix it as soon as it occurs.
Lift one side of the torn carpet to reveal the carpet padding underneath. Carpet tears split the carpet into two sections, and working with one section at a time ensures the best result.
Spread a thin and even layer of carpet adhesive on the padding reaching as far into the carpet as you can.
Pull the carpet hard toward the door frame to help it reach back into the door frame corner. Press hard for several minutes to secure the carpet to the padding.
Repeat the process with the other side of the carpet tear and let the carpet dry for several hours according to the carpet manufacturer's directions. Don't use the carpet in the meantime.