It has long been recognized that pH mediates community structure changes in glacier foreland soils. Here, we showed that pH changes resulted from plant colonization. Plant colonization reduced pH and increased soil organic carbon, which increased bacterial diversity, changed the community structure of both bacteria and fungi, enhanced environmental filtering, and improved microbial network disturbance resistance.