A Web.com Partner
Sign Up / Log In
Online Support Web Hosting

How to Create a phpinfo Page

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. Access your Hosting Manager.
Step 2. Scroll down to the Files tab, then click the File Manager option.
file manager option to access file manager via cpanel
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.
left hand side menu on cPanel page for highlighting public_html folder
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.
new file window to create phpinfo file in root directory
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.
edit button at the top menu bar for the selected phpinfo file created
Another window will appear, click the Edit button.
information alert window to be directed to a text editor page for phpinfo file
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:

sample view of phpinfo page displayed on a browser

Important: You can stop displaying your phpinfo page. By changing the name of the file to phpinfo.php_disabled, for example. This preventive measure is all for security purposes. Hackers could use this file to gather information about your server that might compromise your hosting account.

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!

Was this helpful? Yes No 55% of people found this helpful.
{"message":""}