I had knee pain a while back. It got better after I
1. Wore knee sleeves when I squat (I like TK bands).
2. Got some weightlifting shoes.
3. Kept my f*king knees out in the squat (this probably helped the most).
Not squatting didn't help me, in fact i'm sure that my squats helped un-fuck my knees.