How to Create a PHP Info File Print

  • server php details, create phpinfo file, phpinfo script, how to check php settings, display php configuration, view php version, php diagnostics, whmcs knowledgebase, phpinfo cpanel, phpinfo tutorial
  • 0

How to Create a phpinfo File

Creating a phpinfo file is a quick and easy way to view your server’s PHP configuration, including version, extensions, and environment settings. This is useful for troubleshooting or verifying that certain PHP settings are enabled.

Steps to Create a phpinfo File:

  1. Log in to cPanel and open the File Manager.

  2. Navigate to the folder where you want to place the file (usually public_html).

  3. Click + File to create a new file and name it:

    phpinfo.php
    
  4. Open the new file and add the following code:

    <?php
    phpinfo();
    ?>
    
  5. Click Save Changes and close the editor.

  6. Visit the file in your browser, for example:

    https://yourdomain.com/phpinfo.php
    

You’ll see a detailed page showing all current PHP settings on your server.

Important:
Delete the phpinfo.php file when you're done. Leaving it publicly accessible can expose sensitive server information.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution