The full quasistatic thermomechanical system of PDEs, describing water diffusion with the possibility of freezing and melting in a visco-elasto-plastic porous solid, is studied in detail under the hypothesis that the pressure-saturation hysteresis relation is given in terms of the Preisach hysteresis operator. The resulting system of balance equations for mass, momentum, and energy coupled with the phase dynamics equation is shown to admit a global solution under general assumptions on the data.