In this paper, free vibrations of Porous Functionally Graded Beams (P-FGBs), resting on two-parameter elastic foundations, and exposed to three forms of thermal field, uniform, linear, and sinusoidal, are studied using a Refined Higher-order shear Deformation Theory. The present theory accounts for shear deformation by considering a constant transverse displacement and a higher-order variation of the axial displacement through the thickness of the beam. The stress-free boundary conditions are satisfied on the upper and lower surfaces of the beam without using any shear correction factor. The material properties are temperature-dependent and vary continuously through the depth direction of the beam, based on a modified power-law rule, in which two kinds of porosity distributions, uniform, and nonuniform, through the cross-section area of the beam, are considered. Hamilton’s principle is applied to obtain governing equations of motion, which are solved using a Navier-type analytical solution for simply supported P-FGB. Numerical examples are proposed and discussed in detail, to prove the effect of the thermal environment, the porosity distribution, and the influence of several parameters such as the power-law index, porosity volume fraction, slenderness ratio, and elastic foundation parameters on the critical buckling temperatures and the natural frequencies of the P-FGB.