Cotton, wool, and durable polyester are okay to machine wash. Wool, silk, and delicate cotton should be washed by hand.
Take the pants out of the washing machine as soon as the cycle has ended.
Use light acids, like lemon and vinegar, on cotton pants. Apply a wool detergent to wool pants. Use a standard laundry detergent or dish soap on pants made out of synthetic materials, like rayon and polyester. Silk is very sensitive, so soak the pants entirely when spot-cleaning silk pants. Apply glycerin to the stain.
You will probably need to roll up and squeeze the pants in the towel four or five times.
Folding the pants on the hanger helps to prevent wrinkles. Try to avoid hanging your pants in a place that is very humid. Hang your pants in an area that maintains a 40-50% humidity level.