{"product_id":"n8n-workflow-ssh-wordpress-plugin-theme-updates-rollback","title":"n8n Workflow: SSH WordPress Plugin Theme Updates + Rollback","description":"\u003ch3\u003eAutomatically update your WordPress plugins \u0026amp; themes over SSH—with health checks and automatic rollback\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow keeps your WordPress installation secure by updating plugins and themes via \u003cstrong\u003eSSH + WP-CLI\u003c\/strong\u003e, then verifies the site is still healthy. If an update breaks the site (e.g., WordPress fails to boot or new PHP fatal errors appear), it automatically \u003cstrong\u003erolls back\u003c\/strong\u003e and emails you an \u003cstrong\u003eHTML report\u003c\/strong\u003e—with optional AI analysis of failures.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBootstraps on your server:\u003c\/strong\u003e Copy \u003ccode\u003eselfheal.sh\u003c\/code\u003e from the GitHub repository (\u003ccode\u003egithub.com\/Christianzimpel\/n8n-wp-self-healing-update-agent\u003c\/code\u003e) to \u003ccode\u003e~\/wp-selfheal\/selfheal.sh\u003c\/code\u003e and ensure your server has \u003cstrong\u003eWP-CLI\u003c\/strong\u003e, \u003cstrong\u003ePHP CLI\u003c\/strong\u003e, \u003cstrong\u003etar\u003c\/strong\u003e, and \u003cstrong\u003ecurl\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConnects via SSH and prepares:\u003c\/strong\u003e Uses your SSH private key credential to connect, checks the helper script, creates a \u003cstrong\u003edatabase backup\u003c\/strong\u003e, enables temporary \u003cstrong\u003edebug logging\u003c\/strong\u003e, and fetches available plugin\/theme updates.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates one item at a time:\u003c\/strong\u003e For each plugin\/theme update, it backs up the component, runs the WP-CLI update, and builds HTTP check URLs for the configured site paths.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVerifies site health:\u003c\/strong\u003e After each update, it requests site paths over HTTP and checks—via SSH—whether WordPress boots and whether new \u003cstrong\u003ePHP fatal errors\u003c\/strong\u003e appear.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRolls back if broken:\u003c\/strong\u003e If the site looks damaged, it restores the plugin\/theme from backup over SSH. If rollback fails, it stops further updates and sends an \u003cstrong\u003eemergency email\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReports results:\u003c\/strong\u003e Sends an \u003cstrong\u003eHTML email report\u003c\/strong\u003e. If configured, it can include \u003cstrong\u003eGroq AI\u003c\/strong\u003e analysis of failures.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators managing multiple WordPress instances and wanting safe, hands-off updates.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers running scheduled maintenance with rollback protection.\u003c\/li\u003e\n  \u003cli\u003eTeams that need WP-CLI updates without risking prolonged downtime.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow nodes:\u003c\/strong\u003e if, set, ssh, code, switch, email send\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExecution:\u003c\/strong\u003e scheduled runs or manual triggers\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore tooling:\u003c\/strong\u003e SSH, WP-CLI, PHP CLI, tar, curl\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHealth checks:\u003c\/strong\u003e HTTP site-path checks + SSH inspection for boot status and PHP fatal errors\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReporting:\u003c\/strong\u003e HTML email + optional Groq AI failure analysis\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46288986013875,"sku":"N8N-21702","price":23.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/dKepXHpZ4su0EehFj9enz_DS2nZ2p8.png?v=1793005495","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-ssh-wordpress-plugin-theme-updates-rollback","provider":"N8N Commerce","version":"1.0","type":"link"}