Totally agree with theleip here. I was going to say form aswell. If you're connecting and changing lever balance points properly through the lift not only should it not hurt, but it should be easier to lift more with less effort.
Failing that or to support that, besides looking to your diet for the quality of your glucose and glycos and your vit c and calcium and vit d and the quality of toxin elimination of the build up in your jointfluids ( which is probably going to maker noo sense to you whatsoever), I'd try some extra stretching or some callesthenics .. besides literally mobilising the joints and connective tissuess it also gets you familiar with what good form looks like through the various lvls of improvement. the pain imo is dry joints from crusty gunky fluids that dont permit your joints to lube and nourish properly or it's because the connective point of your tendon is kinked and needs heating and restretched into position.