First things first – you need to change your mindset. Not every exercise will be right for you – at least right now. Many lifters who have knee issues aren’t able to perform back squats, but they keep squatting – many times with bad form. They don’t want to lose the gains they’ve made in leg development over the years. The shift in mindset is realizing that you can still gain leg mass without squats or by using a squat variation that doesn’t hurt.
The best squat variation for you is one that allows you to maintain tension during the lift without causing pain. When your body senses pain, it inhibits (shuts down) contraction of the muscle groups surrounding the area that is painful.
That is why lifters who have pain in their knees have weak quads, hamstrings, and glutes and typically collapse in the hole when they are squatting down. When you have weak muscles surrounding a joint, the joint becomes unstable – which makes you more susceptible to another injury.