If you want to know exactly which PHP version and modules are active on your hosting account, you can create a one-line PHP file that prints the full configuration. This article shows you how to write a phpinfo file, upload it to your site, and view the results.
About phpinfo
PHP includes a built-in function called phpinfo() that prints a detailed page about the current PHP version, configuration directives, and loaded modules. It's the fastest way to confirm exactly which PHP version your site is running, what extensions are enabled, and how PHP is configured on the server.
Warning: A phpinfo page reveals sensitive server details (paths, environment variables, loaded modules). Delete the file as soon as you've checked the information — never leave it on a public site.
Before you begin
- An active Exact Hosting cPanel hosting plan. The example below assumes a cPanel hosting environment.
- A way to upload a file to your site. Either cPanel's File Manager (see File Manager Overview) or an FTP client (see Managing FTP Accounts in cPanel).
- A plain-text editor. Use any code or text editor — Notepad, TextEdit (in plain-text mode), VS Code, or vi all work.
Step 1: Create the phpinfo file
Make a new file that calls the phpinfo() function.
- Open a plain-text editor.
- Paste the following code:
<?php // Shows all PHP configuration settings phpinfo(); ?>
- Save the file as phpinfo.php.
Tip: To see just the loaded modules, use phpinfo(INFO_MODULES); instead of phpinfo();.
Step 2: Upload the file to your website
Upload phpinfo.php to a location your browser can reach — typically the public web root.
- Connect to your site with cPanel's File Manager or your FTP client.
- Open the public_html directory (or the directory of the site you want to check).
- Upload phpinfo.php.
Step 3: View the PHP information
- Open your browser.
- Visit yourdomain.tld/phpinfo.php (replace yourdomain.tld with your actual domain).
- Review the page. The top of the page shows the active PHP version. Scroll down for full configuration and module details.
Step 4: Delete the file
Once you have the information you need, remove the file so it's not accessible to the public.
- Open File Manager or your FTP client.
- Locate phpinfo.php in your web root.
- Delete the file.
Next steps
- Switch PHP versions if needed. See Managing PHP Versions in cPanel.
- Use MultiPHP INI Editor for per-directive tuning. Adjust common PHP directives like memory_limit and upload_max_filesize in cPanel.
Questions? Contact Exact Hosting Support.
How helpful was this article?
Thanks for your feedback!
Do you still need help? If so please submit a request here.