Before purchasing a door, it’s important to measure the thickness of your wall to make sure it matches the width of the door jambs. If you fail to do this or if you have a spare door you want to use to replace a broken one, your door jambs and your wall may not match. To solve this problem, the most practical thing to do is to extend your door jambs.
This Old House shares through its Q and A how extending your door jambs can be done in a few simple steps. First, determine how wide the extensions should be. Then cut the extensions and attach them to your door jambs with woodworking glue and nails.
Read more details here.