Here we demonstrate that ER stress response pathways play a central but heretofore unknown role in innate defenses in vivo. Specifically, we find that bacterial pore-forming toxins (PFTs) activate the ire-1-xbp-1 branch of the ER Unfolded Protein Response (UPR) in C. elegans and mammalian cells and that the ire-1-xbp-1 and atf-6, but not the pek-1, branches of the UPR are important for C. elegans cellular defenses against a PFT since elimination of either of these two branches leads to hypersensitivity to the PFT Cry5B.