I have a ventral hernia and want to lose weight. How can I exercise without hurting?

Aerobic Exercise. Weight loss is primarily related to reducing caloric intake and increasing aerobic activity, in that order of importance. Neither of those should be affected by the presence of a ventral hernia. While building muscle mass may improve one's metabolic rate, this needs to be balanced by the effect that heavy lifting has on the hernia. Have you considered hernia repair?
Binder. Wear an abdominal binder or compression garnet while working out. www.drlugo.com.