I have posted a couple of times about posture. Mainly, because I had bad posture. BUT then I realized. How can you tell if you also have bad posture? And the answer is, unless you know what you are looking at, or you experience pain, discomfort you may not actually know what it is.
So I am going to try and make some effort to clear that up today.
Your posture is caused by a series of imbalances and weaknesses. Which are caused by a weak and loose upper back and posterior delts compared to tight(er) pecs and front deltoids. Especially seeing how the pec minor (upper pec) attaches all the way back to the scapula so it being tight can cause the "slouching" posture.
The main cause of this imbalance is once again due to sitting too much. This is referred to as lumbar lordosis, due to weak abdominal muscles and hamstrings/glutes, and tight quads and hip flexors. Regarding the lordosis, people have suggested stretching your hip flexors and quads, and doing abs and hamstring/glute work: Bulgarian Split Squats are great, romanian deadlifts, or barbell/dumbbell hip thrusts, or hip "bridges").

These imbalances are very frequent since many people tend to gloss over pulling exercises in favour of more "trendy" pushing, like bench press and shoulder presses, but having a sedentary lifestyle doesn't help as well.
So, you wanna work on your scapular retraction for the kyphosis and on strengthening your core for the lordosis.
Some exercises that work on this are barbell and cable rows, reverse flies, and facepulls. Facepulls were a huge help when I was correcting my posture. But don't run out just yet, with facepulls it is important to remember to do low weight high reps on this, focusing on form, the muscles they target are really small so they cant sustain as much overload as other bigger muscles.
High rep, good form, low weight.
They helped resolve all the knots I'd get in my upper back. Great, underutilized exercise! And while this worked for me, don't worry if you don't get the same results. Everybody has different bad posture. And getting the right exercise will offer dramatic improvements to your posture. Once you've fixed these issues is when the real work really begins.
Posture is mainly a matter of habit once you have taken care of any underlying issues. The reason being that once you get into a specific habit, for example due to a weak back, you will find it hard to get out of it even if you have fixed the underlying issues, i.e. a stronger back, etc.
You need to be very conscious, at least initially, of your posture.
What I did was check my posture every couple of minutes or so and then if I found I was out of alignment, correct it.
Check it in every position you habitually move in:
- is your posture good while taking a stroll?
- While working on your computer?
- When you're carrying grocery bags on only one arm?
It may take a couple of years, but in the end it is worth it, and it will leave you with a better quality of life.