Microglial Nhe1 cKO brains exhibited increased post-stroke microglial phagocytic activity and improved dendritic spine plasticity. Here, SLC9A1 is linked to stroke disorder.