If the frame is in decent condition and not warped or damaged, you may often replace a door without changing the structure. Determine whether the problem is with the door or the frame if the door isn't shutting properly or if there are gaps around it that need to be insulated.