My knees were pretty much destroyed when I was 18 in a freak accident. I've had several operations on both, they've been partially reconstructed, I have lots of hardware in there. Both feet were broken, too, and I had a head injury that left me 3 weeks in a coma.
Then at 33 I broke my back.
I am now in my mid forties, and although I still deal with pain on occasion, I can backpack anywhere, do yoga, swim, lift weights, I even got a black belt in taekwondo at 39 years old.
The key, for me, was to never stop moving, but to be patient and careful, work things up gradually.
I have kept my weight down to alleviate pressure on my joints, and kept my muscles strong and flexible to protect them.
Listen to your body is my best advice.
Pay attention to the cues it gives you with dull aches, swelling, sharp pain etc, adjust your activity and intensity accordingly.
I live relatively pain free now, unless I am tired or the weather changes. Gotta love being a walking barometer!
Time is your best friend, though. The older we get, the longer we take to heal so respect that, but keep moving... gently at first.
One key element is to condition your core to rock solid: with a strong core, you don't lose your balance and catch yourself on your leg, which could hurt if you do a wrong move. You also don't compensate with your lower body so your step is sturdier and more supple. That helped me a lot.
Good luck!