Catalyzes the hydrolysis of alpha,alpha-trehalose into two molecules of D-glucose. Does not hydrolyze maltose, isomaltose, sucrose, cellobiose, p-nitrophenyl-alpha-D-glucopyranoside, and methyl-alpha-D-glucopyranoside. Is also inactive on alpha,beta-trehalose, beta,beta-trehalose, alpha,alpha-trehalose-6,6'-dibehenate, trehalulose, nigerose, and trehalose dimycolate. alpha,alpha-trehalose + H2O = alpha-D-glucose + beta-D-glucose Shows an absolute requirement for inorganic phosphate and Mg(2+) for activity. The function of the phosphate may involve stabilizing the protein conformation and/or initiating protein aggregation. Mg(2+) cannot be replaced by Ca(2+), Mn(2+) or Zn(2+). Inhibited by pyrophosphate and polyphosphates. Also competitively inhibited by validoxylamine and castanospermine, but not by trehazolin. Optimum pH is 7.1. The trehalase activity drops sharply at pH values of 6.5 and below, as well as at pH values of 8.0 and above. Glycan degradation; trehalose degradation; D-glucose from alpha,alpha-trehalose: step 1/1. Homomultimer of 20 or more subunits. Belongs to the glycosyl hydrolase 15 family.