- Log into your cPanel.
- In the Files section of your cPanel, open the File Manager option.
- Click “public_html” folder and navigate to the directory you are working with
- In the top menu, click on the +File option to create a new file.
- Enter phpinfo.php
- *Note the file name can be anything you want, only the extension must be .php (FileName.php).
- Find the phpinfo.php file in your list of files (it should update automatically).
- Right-click on it and click Edit.
- Enter the following code into the phpinfo.php file.
PHP Info
- Then click Save Changes.
Now that you have created the phpinfo page, we’ll show you how to access it and view your PHP settings. You can now access this page from your browser. If you created the file in your public_html folder, you should visit https://testing.com/phpinfo.php.
Be sure to replace testing.com with your actual domain name.
To find the specific value for a parameter, search the page for what you are looking for.
WARNING: Your phpinfo page has many PHP settings that you do not wish to broadcast to the world.
When you are done using the file, be sure to delete it.
Another path you can take instead of deleting it however is to name the file something other than phpinfo.php. Since phpinfo.php is such a common name, ‘bots’ on the web will randomly search for files named phpinfo.php. Setting the file name to something like 7845734554.php would never be guessed by a bot (so no one would ever find it) but it might be hard to remember this in the future. You have now learned how to create a phpinfo.php file and verify PHP information through your hosting control panel or default browser.