Knowledge Base

How to Create a phpinfo Page in cPanel

If you want to know your PHP configuration, then this guide is for you. Your phpinfo page will show you large information about the current status of your PHP. The PHP info page will display information like PHP version, server information and environment.

This is helpful to know if your PHP configurations are compatible with the requirements of any software you want to run on your server. So, now you have a brief background of the phpinfo page. We’ll guide you on how to create and view it on your browser.

How to Create a phpinfo Page

You need to access your public_html for you to create your phpinfo page. Follow the steps below.

Step 1. Log in to your cPanel.

Step 2. Scroll down to the Files tab, then click the File Manager option.

Step 3. Once the File Manager loads, all of the files and folders in your webspace will be displayed.

Step 4. In your cPanel page, locate your public_html root directory on the left-hand side menu.

Step 5. Click the + File button at the top menu bar. A window will pop up. In the New File Name field, enter phpinfo.php as the file name. And enter /public_html to the New file will be created in the field.

Step 6. Click the Create New File button.

Step 7. Right-click on the file you created and select the Edit option or you can select the phpinfo.php file and click the Edit button at the top menu bar.

Another window will appear, click the Edit button.

Step 8. It will direct you to the Text Editor page. Add the following lines to your phpinfo.php file.

<?php phpinfo(); ?>

Step 9. Click the Save Changes button. And click the Close button to close the Text Editor page. So the next thing to do now is to view your phpinfo.php page from your browser.

How to View Your PHP info Page

Viewing your PHP info page should be easy. You can view it by adding /phpinfo.php after your domain name. It should be similar to this: http://yourdomain.com/phpinfo.php when viewing it via your browser.

Here’s an example of the page it will display:

You’ve just learned how to create a phpinfo page and how to view it. Feel free to contact us if you need further assistance or if you have any questions about your phpinfo file. We’d love to help!

Did you find this article helpful?

* Your feedback is too short