This paper illustrates the effectiveness of a functionally graded core in preventing wrinkling in sandwich structures. The problem is solved for piecewise and continuous through-the-thickness core stiffness variations. The analysis is extended to account for the effect of temperature on wrinkling of a sandwich beam with a functionally graded core. The applicability of the developed theory is demonstrated for foam cores where the stiffness is an analytical function of the mass density. In this case, a desirable variation of the stiffness can be achieved by varying the mass density through the thickness of the core. Numerical examples demonstrate that wrinkling stability of a facing can significantly be increased using a piecewise graded core. The best results are achieved locating the layers with a higher mass density adjacent to the facing. A significant increase in the wrinkling stress can eliminate wrinkling as a possible mode of failure, without noticeably increasing the weight of the structure. In the case of a uniform temperature applied in addition to compression, wrinkling in a sandwich beam with a functionally graded core is affected both by its grading as well as by the effect of temperature on the facing and core properties. Although even a moderately elevated temperature may significantly lower the wrinkling stress, the advantage of a graded core over the homogeneous counterpart is conserved.