Skip to content

How do I set expose_php to Off?

The expose_php setting reveals that PHP is installed on the server by including the PHP version in the HTTP header (e.g., X-Powered-By: PHP/7.3.13). This is enabled by default. To disable it:

  1. Log in to cPanel for your hosting account.

  2. Search for Select PHP Version:

  3. Select the Options menu.

  4. Find the expose_php setting and uncheck it to turn it off.

For more PHP settings you can adjust, see Using PHP Selector to change your PHP version, modify extensions.