Plant immunity often penalizes growth and yield. The transcription factor Ideal Plant Architecture 1 (IPA1) reduces unproductive tillers and increases grains per panicle, which results in improved rice yield. Here we report that higher IPA1 levels enhance immunity. Mechanistically, phosphorylation of IPA1 at amino acid Ser163 within its DNA binding domain occurs in response to infection by the fungus Magnaporthe oryzae and alters the DNA binding specificity of IPA1. Phosphorylated IPA1 binds to the promoter of the pathogen defense gene WRKY45 and activates its expression, leading to enhanced disease resistance. IPA1 returns to a nonphosphorylated state within 48 hours after infection, resuming support of the growth needed for high yield. Thus, IPA1 promotes both yield and disease resistance by sustaining a balance between growth and immunity.