In this study, a theoretical analysis of consolidation behaviors for an elastic porous medium containing two immiscible, compressible, viscous fluids is presented based on the theory of poroelasticity and the linear stress-strain relationship. Using Laplace transformation, we derive the analytical solution of the excess pore pressure of the wetting and nonwetting fluids as well as soil settlement for different drained and undrained boundaries under a constant external load. To quantitatively investigate the consolidation process of an unsaturated porous medium, a numerical study was carried out to determine the dimensionless pore water pressure and soil settlement for sand, silt loam and clay whose pore space is simultaneously occupied by air and water as illustrative examples. Then, the effect of fluid saturation, boundary condition, and soil texture on the dimensionless pore water pressure and soil settlement was also examined.Our numerical results show that the dimensionless pore water pressure dissipates faster as water saturation is lower, in which soil settlement also tends to achieve stable faster. In addition, it is also revealed that sand was the fastest to respond to the external load, followed by silt loam and clay. Lastly, soil settlement is found to be greatest in clay, followed by silt loam and sand, which is mainly dominated by the bulk modulus of solid matrix.