Review building codes for your area to determine the size of studs and headers needed for load-bearing doors. In general, the wider the door opening, the larger you'll need the header to be to effectively support the weight. If you aren't sure what size of lumber to use based on the codes, ask for assistance from the building department or hire an engineer to help you calculate your needs for the door framing.
Cut 2-by-4 inch boards for the king studs. The king studs are the two vertical studs on either side of the door. Cut the studs to reach from floor to ceiling. Nail the studs into position.
Cut the header from a 2-by-12 inch board so it spans the distance between the two king studs on either side of the door opening. Cut two of the header boards, which you will connect together for a double header board. Cut half-inch plywood spacers and place them between the two header boards. Nail the header pieces and plywood spacers together to finish the header.
Nail the header between the two king studs. The bottom of the header creates the top edge of the door opening. Position the header based on the height of the door and jamb you are installing so that they fit in the space without a large gap between the top of the door and bottom of the header.
Cut a 2-by-4 inch board to create the top plate that spans the top edges of the king studs. Nail the board into place.
Cut cripple studs from 2-by-4 inch boards to go vertically between the top plate and the header. Space the cripple studs at the same distance as the rest of the studs in the wall, typically 16 inches on center. Nail the cripple studs into place.
Cut trimmer pieces from 2-by-4 inch boards. The trimmer pieces run vertically from the floor to the bottom side of the header as support and butt up next to the king studs. Nail the trimmer pieces in place.