Forked from Jinksi/gist:d9856f3a053ce7ff29e39d51d6941da0
Last active
March 10, 2026 02:19
-
-
Save deanoakley/f4bcfe047c9798b1e667223a7d5dd839 to your computer and use it in GitHub Desktop.
Serverpilot disable display php errors server-wide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # One liner to disable display_errors for all installed ServerPilot PHP versions, then restart matching FPM services | |
| for ini in /etc/php*-sp/php.ini; do [ -f "$ini" ] && sudo sed -i '/^display_errors\s*=/d' "$ini" && echo 'display_errors = false' | sudo tee -a "$ini" > /dev/null; done; for svc in /etc/init.d/php*-fpm-sp; do [ -e "$svc" ] && sudo service "$(basename "$svc")" restart; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment