Knowledgebase: PHP / Programming
How do I set expose_php to Off?
Posted by Tony B., Last modified by Tony B. on 22 January 2020 10:07 PM

The expose_php setting exposes to the world that PHP is installed on the server, which includes the PHP version within the HTTP header (e.g., X-Powered-By: PHP/7.3.13). The default PHP setting is for this setting to be on and by default we use all reasonable PHP default settings for maximum compatibility. You can however set expose_php to off by doing the following:

  1. Login To your cPanel
  2. Go to "Select PHP Version" in your cPanel:

  3. Once on this page you'll select the "Switch to PHP options" button which will bring you to the majority of the PHP settings we allow you to override
  4. On the expose_php setting change it from being checked to unchecked and this will turn set expose_php to off

You will need to set this for each PHP version you wish to have PHP no longer be exposed in PHP headers.

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).