I ve seen people reccomend both ways.
Install door casing before carpet.
I ll assume you re installing a door and jamb if you aren t installing a jamb i d hold off on the door until the carpet is installed so it s not in the way.
Keeping the shims and the fasteners low helps to prevent the carpet installers from moving the jambs out of position when they come along with their knee kickers.
I had some woven backed carpet from stanton that i had to install in a couple of rooms the other day and knowing the stuff is stiff and doesn t give much stretch especially in the width i decided to undercut the door casings between the two rooms.
If i m installing the hardwood i d like to go first and the trim guy can scribe his jambs.
Even if you think you can avoid ruining your carpet by painting the trim before installation.
I did doors before carbet i m with ed 1 2 off the floor but i did all the finish trim after carpet set the base and door casings gently on the carpet don t push it tight.
But for me as a diyer it was easier to do the base after the carpet and that way no gaps.
You can also put a strip of 2 inch delicate work painter s tape on your trim before the carpet goes down.
You ll still need to protect your carpet during this step and you can avoid the entire process by just painting the baseboards after they re on the wall.
Keep in mind that you ll still need to come in and touch the paint job up after installation.
Door window maintenance.
My advise install the trim and doors first and stress to the carpet installers to be as careful as possible.
Before carpet when installing baseboard before carpet the easiest thing to do is to install it even with the bottom edge of the drywall as previously described.
Installing trim before the carpet is a good idea for a couple of important reasons.
At this point the only other difference with installing a pre hung door for a room that will be carpeted is that i keep the shims and the nails close to the floor on both sides.
Leave about a half inch at the bottom of the trim uncovered.
Honestly its more work to scribe the jambs in my opinion you basically have to set the door twice the other consideration is do you want to install the hardwood without shoe moulding.
The install went great but it took me extra prep time and i m not sure i d do it again.
If you re installing the jamb i would do it before the carpet so the jamb can rest on the ground.
How to install trim before the carpet.