Climate change can influence soil microorganisms directly by altering their growth and activity but also indirectly via effects on the vegetation, which modifies the availability of resources. Direct impacts of climate change on soil microorganisms can occur rapidly, whereas indirect effects mediated by shifts in plant community composition are not immediately apparent and likely to increase over time. We used molecular fingerprinting of bacterial and fungal communities in the soil to investigate the effects of 17 years of temperature and rainfall manipulations in a species‐rich grassland near Buxton, UK. We compared shifts in microbial community structure to changes in plant species composition and key plant traits across 78 microsites within plots subjected to winter heating, rainfall supplementation, or summer drought. We observed marked shifts in soil fungal and bacterial community structure in response to chronic summer drought. Importantly, although dominant microbial taxa were largely unaffected by drought, there were substantial changes in the abundances of subordinate fungal and bacterial taxa. In contrast to short‐term studies that report high resistance of soil fungi to drought, we observed substantial losses of fungal taxa in the summer drought treatments. There was moderate concordance between soil microbial communities and plant species composition within microsites. Vector fitting of community‐weighted mean plant traits to ordinations of soil bacterial and fungal communities showed that shifts in soil microbial community structure were related to plant traits representing the quality of resources available to soil microorganisms: the construction cost of leaf material, foliar carbon‐to‐nitrogen ratios, and leaf dry matter content. Thus, our study provides evidence that climate change could affect soil microbial communities indirectly via changes in plant inputs and highlights the importance of considering long‐term climate change effects, especially in nutrient‐poor systems with slow‐growing vegetation.