I think with cycling you need to be really patient.
Id say increase distance/duration/intensity slowelly and incrementally. 10% per week comes to mind. Also if you wanna prevent injuries, exercise no more than 3-4 times a week maximum. Consider ride, run and gym if your doing that.
Correct bike fit, alignment and pedeling. If your injured it may pay to lower the seat.
Stretch before and after your ride. Stretch all the leg muscles.
Cool down. Dont finish off with a hard hill then come home and crash. Take a little time 5-10 minutes at low intensity to cool down. it flushes out waste products and increases recovery.
Massage, self massage. Especially if you have ITB issues.