PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem paths and application details. For a production website, keep public error display off and investigate the error log. Temporary display is most appropriate in a restricted development environment.
IN THIS ARTICLE
Check access and requirements
Record the time and URL of the failure and locate the account's error log. If a test requires visible errors, use staging or an access-restricted copy and avoid processing live customer information there.
01 Change the setting
- In Plesk, select the correct subscription and open PHP Selector from the available sidebar or additional tools. This guide applies to Linux subscriptions where the CloudLinux integration is installed. Windows Plesk uses its own PHP configuration.
- Check the active PHP version and which websites the selector change will affect. Plesk also has a native PHP Settings page for each domain. A CloudLinux setting will not automatically override a different Plesk PHP handler. Confirm which handler serves the website first.
- Open Options and find display_errors. Set it to Off for production, or temporarily enable it in the controlled test environment.
- Where exposed, check that log_errors is enabled and that the configured log is outside public downloads or otherwise access restricted. Save your changes.
- Reproduce the fault once and read the newest matching log entry. Fix the identified cause, then keep public display disabled when returning the site to normal operation.
Confirm the expected result
Visit the affected page as a signed-out visitor and confirm that it no longer exposes a stack trace or server path. Verify that a reproducible test error is still recorded in the intended log so that disabling display does not remove your ability to diagnose problems.
Why can errors still appear, or fail to reach the log, after I change these settings?
Application debug modes can control their own output independently of PHP. Check the CMS or framework's production/debug configuration too. If nothing reaches the selected log, the website may use another PHP handler or a different log location. Share a redacted error excerpt with support.