Owing to mathematical and geometrical complexities, there is an evident lack of stability analyses of thick closed shell structures with porosity. Based on an effective analytical approach, for the first time, simultaneous effects of porosities, elasticity of edge constraint, and surrounding elastic media on the buckling resistance capacity of thick functionally graded material (FGM) toroidal shell segments (TSSs) subjected to external pressure, elevated temperature, and combined thermomechanical loads are investigated in this paper. The volume fractions of constituents are varied across the thickness according to power law functions, and effective properties of the FGM are determined using a modified rule of mixture. The porosities exist in the FGM through even and uneven distributions. Governing equations are based on a higher-order shear deformation theory (HSDT) taking into account interactive pressure from surrounding elastic media. These equations are analytically solved and closed-form expressions of buckling loads are derived adopting the two-term form of deflection along with Galerkin method. Parametric studies indicate that the porosities have beneficial and deteriorative influences on the buckling resistance capacity of thermally loaded and pressure-loaded porous FGM TSSs, respectively. Furthermore, tangential constraints of edges lower the buckling resistance capacity of the shells, especially at elevated temperatures.