Create a phpinfo.php page

Luckily, creating a phpinfo page can be performed fairly quickly and easily!

  1. Open your website files using a File Manager, FTP, or SSH.
  2. Navigate to your website’s root directory. This generally will be:
    • Plesk: httpdocs
    • cPanel: public_html
  3. Create a new file named phpinfo.php in your associated website root directly
    You do have the option to add this file into any subdirectory of your choosing.
  4. Add the following lines into your phpinfo.php file:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

View your phpinfo page

  1. To view your php info page, open a browser and go to the URL http://www.example.co/phpinfo.php

The php info page will be under example.com/phpinfo.php assuming you uploaded the file to your website root directory.

  1. You can view all of the information about PHP for your server for that particular directory.
  2. If you’d like to search for a specific module or resource limit, you can press the following keys:
    • Windows: CTLR + F
    • Mac: CMD + F
  3. Then type the name of the module or resource in question.

That’s it! You should now know how to create, view, and search through a phpinfo.php page!

Leave a Comment

Your email address will not be published. Required fields are marked *