If you need to check your website’s PHP settings, the phpinfo function can help, it provides detailed information about your server’s current PHP configuration. Perfect for checking if your server meets the requirements for a specific software, troubleshooting issues or optimising performance. This guide will walk you through two approaches: using MultiPHP Manager and creating a phpinfo file manually. Both are easy and widely used by developers and server admins.
This method is for users who prefer a graphical interface and don’t want to create extra files on their server.
1. Log in to cPanel. Access your hosting account and log in to cPanel.
2. Use the search bar at the top of cPanel to find the Select PHP Version tool.
3. On the Select PHP Version page, click the PHP Info link. This will open a new page with all the PHP info, including:
4. Use your browser’s search function Ctrl + F
to quickly find specific modules or settings.
1. Log in to your cPanel control panel and open File Manager. Go to the public_html directory or the root of your website (depending on how you set it up).
2. Click New File and name it informationfile.php.
3. Right-click the informationfile.php file and click Edit.
4. Add the following code to the file: <?php phpinfo(); ?> then save the file.
5. If you prefer to use an FTP client like FileZilla, create the informationfile.php file on your computer, add the code above, and upload it to your server’s public_html directory.
6. Once the file is created, open your browser and go to: https://yourdomain.tld/informationfile.php
7. You’ll see all the PHP info, including:
Use .htaccess rules to restrict access to the informationfile.php file to specific IP addresses. You can do that by using the files command with the .htaccess file as shown below.
<Files "phpinfo.php">
Order Deny,Allow
Deny from all
Allow from 192.168.1.1
</Files>
Once you’ve checked the PHP info, rename the file (e.g., informationfile.php_disabled) or delete it.
Never leave the informationfile.php file publicly accessible for too long.