Economicalhost · Knowledge Base
Knowledge Base › Advanced Security › How to Hide PHP Version and Errors
Advanced Security

How to Hide PHP Version and Errors

Showing your PHP version and raw errors to visitors hands useful information to attackers. Two quick settings close that gap.

Step-by-step

  1. Open Software → MultiPHP INI Editor and select your domain.
  2. Set display_errors to Off so PHP errors are never shown to visitors (they still go to the error log).
  3. Set expose_php to Off if available (Editor Mode: expose_php = Off) so the server stops advertising its PHP version in headers.
  4. Click Apply.
  5. In WordPress, ensure WP_DEBUG is false in wp-config.php on the live site.
  6. Verify by triggering a known error — visitors should see a generic message, while the detail appears only in your log.

💡 Good to know

  • Always log errors, never display them, on a live site.
  • Keep PHP itself current too — hiding the version is no substitute for updating it (change PHP version).
  • Run Security Advisor to catch other easy wins.