Blot up liquid spills immediately with paper towels. Do not rub, as doing so can cause the stain to penetrate the base of the fibers. Continue blotting until liquid is fully absorbed.
Mix cold water with mild carpet shampoo according to label instructions. Pour the mixture into a spray bottle.
Spray the mixture on a small, inconspicuous area of the carpet to test for color fastness. Proceed only if the colors are left intact; consult a professional cleaner if colors run. Spray the mixture over the stain, dousing it completely.
Blot the soapy solution on the carpet with paper towels. Start from the outer edges of the stain and work your way in. Again, do not rub the stain. Use clean towels when the previous ones become saturated. Continue until stain is removed.
Spread a wet rag over the area on the carpet you have been treating to remove soapy residue. Dry with a hair dryer.
Flip the carpet over so its underside faces you. Inspect the carpet for tears. Push loose fabric through any tears with a putty knife.
Join both edges of a tear together as close as you can with your hands. Cut a piece of duct tape long enough to extend beyond the edges of the tear by several inches to prevent it from becoming longer. Place it over the tear. Repeat for any additional tears.
Turn the carpet back over.
Snip off frayed fibers with sharp scissors. Thread an upholstery needle with heavy-duty, wool or cotton thread that matches the background of the carpet. Knot the end of the thread.
Insert the needle from the back of the carpet through the front, starting 1/4 inch beyond the frayed edge. Pull the thread over the edge and back under. Repeat this process of wrapping thread over the frayed edge until the section is covered.
Knot the thread at the back of the carpet and snip off excess thread with scissors.