The easiest way to create your phpinfo.php file is to use File Manager on cPanel. To do this, simply follow these steps:
- Log in to cPanel and navigate to the Files section.
- Click on File Manager and navigate to the root folder of the domain name you want to create the file on. For your primary domain name, this will be the public_html folder.
- Click on + File from the top menu and call the new file phpinfo.php and click Create New File.
- Either right-click on the file and select Edit or you can click on the file and select Edit from the top menu.
- Add the code below and click Save.
<?php
phpinfo();
?>
Now, when you visit yourdomain.com/phpinfo.php you will see all the necessary PHP information.