What's the location of the door external or internal
Also is the door to a location such as a bathroom or kitchen that is portly ventilated?
You can plane the door to make it re fit the opening however once its re acclimatised to dryer conditions it will shrink back and show a bigger gap
For both instances the tops and the bottoms of the doors are usually overlooked in the painting stage would be worth sealing them on locations such as stated above
If the door is external and timber any amount of fine cracks in the paintwork will allow moisture in to swell the door so regular maintenance is paramount,