How to create a phpinfo page

How to create a phpinfo page

Pradheep BS
Written by Pradheep BSLast update 4 months ago

You can view your server configuration by creating a phpinfo file. The phpinfo page will provide information about the server configuration, PHP version, installed modules, environment variables, OS information etc.

How to create a phpinfo page


  1. Open the File Manager in your Hosting Control Panel, or connect to your server via SSH or FTP

  2. Navigate to the folder where your website files are there. On shared hosting servers, it is usually /home/USERNAME/public_html and /var/www/html in VPS servers.

  3. Create a new file: phpinfo-70ccde79-e6b8-497b-8ca4-8031a015fe3a.php

  4. Edit the file, and save the following code inside it:

<?php echo phpinfo(); ?>

Once you've uploaded this file to your server, visit the page in your browser by entering example.com/phpinfo-70ccde79-e6b8-497b-8ca4-8031a015fe3a.php

We strongly recommend to delete this file after use, as it contains highly sensitive information

Did this answer your question?