Knowledge Base
How to create a phpinfo.php file in cPanel
You can create a phpinfo.php file to view your website's current PHP version, loaded modules, and PHP configuration settings. This can help you troubleshoot website issues and verify PHP settings applied to your hosting account.
Create a phpinfo.php file
- Access your cPanel File Manager.
- Navigate to the public_html folder.
- Click ✚File.
- Under New File Name, enter phpinfo.php and click Create a New File.
- Right click on the newly created phpinfo.php file and select Edit.
- Enter the following code:
<?php phpinfo(); ?>
- Click Save Changes, then Close.
Review the PHP information
- In a web browser, enter
<yourdomain.com>/phpinfo.php. - Review the PHP information displayed for your website, including:
- PHP version
- Active PHP extensions
- PHP configuration values
- Server environment information
Important: The phpinfo.php page displays detailed information about your hosting environment, including PHP and server configuration details. For security reasons, delete the file or restrict access to it when you no longer need it.
Did you find this article helpful?