1. Home
  2. Authoring and Development
  3. How to Add a phpinfo() Page to a Site

How to Add a phpinfo() Page to a Site

Shared

VPS

Dedicated

You can create a phpinfo() web page that will simplify accessing your server’s current PHP information. When visited, the phpinfo() webpage will output information about the current state of PHP on the server.

Adding a phpinfo() page to your website

To add a phpinfo() page to your site, follow the instructions below:

  1. Log in to the Account Control Center (ACC)
  2. Navigate to your website files

    For more information about navigating through the file system, see our article, Our File Directory Structure.

  3. Create a new file
  4. Name the file phpinfo.phpname image
  5. Enter the following code in the text field:

    <?php 
    phpinfo();
    ?>

    text field image

    In the code above, phpinfo(); defaults to the INFO-ALL option, which shows all PHP info. If you would prefer to be more selective about what is shown, you can add in specific phpinfo() options. You can find a list of phpinfo() options on php.net in the parameters section.

  6. Click Create File
  7. Now go visit your phpinfo.php file. You can do this by entering yourwebsite.com/path/to/phpinfo.php in the browser

If set up correctly, the current PHP information output for the server should be displayed on the page.output image

Updated on February 4, 2019

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support